Animation Nodes -> numpy.core.multiarray -> import aud #73977

Closed
opened 2020-02-18 17:58:09 +01:00 by Odie Fox · 33 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: 77d23b0bd7

Short description of error
Attempting to get the addon Animation Nodes to work.
Installing addon and then checking box to enable it gives error: ImportError: numpy.core.multiarray failed to import
I raised this error to the github for the addon, eventually they asked to raise it to blender bug tracker because importing aud fails.

import aud

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
Traceback (most recent call last):

File "<blender_console>", line 1, in <module>

ImportError: numpy.core.multiarray failed to import

They said this was not an issue with AN addon, but bith Blender.

Exact steps for others to reproduce the error
I can get this error from a fresh install of Blender 2.8.2 by opening Blender, going to scripting tab for quick access to python console, and typing:

import aud

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66 **Blender Version** Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: `77d23b0bd7` **Short description of error** Attempting to get the addon Animation Nodes to work. Installing addon and then checking box to enable it gives error: ImportError: numpy.core.multiarray failed to import I raised this error to the github for the addon, eventually they asked to raise it to blender bug tracker because importing aud fails. >>> import aud ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' Traceback (most recent call last): ``` File "<blender_console>", line 1, in <module> ``` ImportError: numpy.core.multiarray failed to import They said this was not an issue with AN addon, but bith Blender. **Exact steps for others to reproduce the error** I can get this error from a fresh install of Blender 2.8.2 by opening Blender, going to scripting tab for quick access to python console, and typing: >>> import aud
Author

Added subscriber: @Oddyfox

Added subscriber: @Oddyfox
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Aaron Carlisle self-assigned this 2020-02-18 18:02:08 +01:00
Member
Please report the bug here: https://github.com/JacquesLucke/animation_nodes

Added subscribers: @JacquesLucke, @OmarEmaraDev, @brecht

Added subscribers: @JacquesLucke, @OmarEmaraDev, @brecht

Changed status from 'Archived' to: 'Needs Triage'

Changed status from 'Archived' to: 'Needs Triage'

Seems this was reported to the add-on and they claim it's a bug in Blender. So it seems wrong to close this without at least a developer looking at this report.

Seems this was reported to the add-on and they claim it's a bug in Blender. So it seems wrong to close this without at least a developer looking at this report.
Author

As noted, I have already raised this issue with the addon github. I was pointed here by them, after being told this was an issue with the Audaspace library and to raise the issue here.

As noted, I have already raised this issue with the addon github. I was pointed here by them, after being told this was an issue with the Audaspace library and to raise the issue here.
Aaron Carlisle removed their assignment 2020-02-18 18:10:02 +01:00
Member

Mea culpa

Mea culpa
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

Can't repro on windows with the official 2.82 or latest master

Please run the blender_debug_log.cmd batch file in the blender folder and follow the instructions to attach the logs to this ticket.

Can't repro on windows with the official 2.82 or latest master Please run the `blender_debug_log.cmd` batch file in the blender folder and follow the instructions to attach the logs to this ticket.
Author

blender_debug_output.txt

blender_system_info.txt

Opened blender via blender_debug_log.cmd
went to scripting tab
same error as mentioned above when trying

import aud

[blender_debug_output.txt](https://archive.blender.org/developer/F8348374/blender_debug_output.txt) [blender_system_info.txt](https://archive.blender.org/developer/F8348375/blender_system_info.txt) Opened blender via blender_debug_log.cmd went to scripting tab same error as mentioned above when trying >>> import aud
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

First, I copied my python37 site-packages into my Blender2.8.2 python folder (the second option in the link you provided). This did not work, so I proceeded to the first option.

I deleted the python directory in Blender 2.8.2 and updated my PYTHONPATH environment variable accordingly, this also did not work.

It still gives me the same error in the first post, but importing numpy works fine, as it did previously.

I'm going to delete Blender 2.8.2 and uninstall Anaconda temporarily, reinstall Blender 2.8.2 and see if the add-on works.

So, just to be clear, Anaconda no longer on your system, along with it’s own version of numpy?

You are using a new reinstalled version of Blender, and the python that came with it, not your system’s python placed into the Blender python folders, correct?

What is PYTHONPATH set to currently? Blender was updated to ignore PYTHONPATH, but that information might still be useful to eliminate that as a variable for the cause of this issue.

> First, I copied my python37 site-packages into my Blender2.8.2 python folder (the second option in the link you provided). This did not work, so I proceeded to the first option. > I deleted the python directory in Blender 2.8.2 and updated my PYTHONPATH environment variable accordingly, this also did not work. > It still gives me the same error in the first post, but importing numpy works fine, as it did previously. > I'm going to delete Blender 2.8.2 and uninstall Anaconda temporarily, reinstall Blender 2.8.2 and see if the add-on works. So, just to be clear, Anaconda no longer on your system, along with it’s own version of numpy? You are using a new reinstalled version of Blender, and the python that came with it, not your system’s python placed into the Blender python folders, correct? What is PYTHONPATH set to currently? Blender was updated to ignore PYTHONPATH, but that information might still be useful to eliminate that as a variable for the cause of this issue.
Member

@EAW the debug batch files reset the PYTHONPATH var, i'm 100% sure it is not set when blender starts with those.

@EAW the debug batch files reset the PYTHONPATH var, i'm 100% sure it is not set when blender starts with those.
Author

I have not updated my PYTHONPATH environment variable since that github post, I can try that in a moment.

  • Anaconda is no longer on my system along with any libraries it managed, including numpy. (I still have a version of python37 that was installed outside of anaconda for other reasons, I thought about uninstalling this as well but have not)
  • I have uninstalled all previous versions of Blender, and then reinstalled the latest stable 2.82 version from the blender.org website, and have not tampered with any files, python or otherwise, that it installed.
  • above for PYTHONPATH; I'm going to clear my PYTHONPATH variable since it should not be required, unless you're suggesting I put something specific inside it to point somewhere

Not sure I'm following what Ray is saying, let me know if there is something I should do to take action on my PYTHONPATH.

As an aside, I have installed Blender 2.82 on another machine and the addon installs and enables correctly (Surface Book, has Anaconda and another installation of Python3.7, same as this desktop machine).
I'm debating doing a factory reset and seeing if the issue persists, since I can't find a reason behind any of this.

I have not updated my PYTHONPATH environment variable since that github post, I can try that in a moment. - Anaconda is no longer on my system along with any libraries it managed, including numpy. (I still have a version of python37 that was installed outside of anaconda for other reasons, I thought about uninstalling this as well but have not) - I have uninstalled all previous versions of Blender, and then reinstalled the latest stable 2.82 version from the blender.org website, and have not tampered with any files, python or otherwise, that it installed. - above for PYTHONPATH; I'm going to clear my PYTHONPATH variable since it should not be required, unless you're suggesting I put something specific inside it to point somewhere Not sure I'm following what Ray is saying, let me know if there is something I should do to take action on my PYTHONPATH. As an aside, I have installed Blender 2.82 on another machine and the addon installs and enables correctly (Surface Book, has Anaconda and another installation of Python3.7, same as this desktop machine). I'm debating doing a factory reset and seeing if the issue persists, since I can't find a reason behind any of this.
Member

the blender_debug_log.cmd batch file has this in it

set PYTHONPATH=

so when you ran with that batch file the pythonpath was cleared (for just that session) so i don't think that any further messing with it will solve the issue.

I'd probably use process monitor to see if it is picking up numpy from somewhere other than the blender folder.

the `blender_debug_log.cmd` batch file has this in it `set PYTHONPATH=` so when you ran with that batch file the pythonpath was cleared (for just that session) so i don't think that any further messing with it will solve the issue. I'd probably use [process monitor ](https://docs.microsoft.com/en-us/sysinternals/downloads/procmon) to see if it is picking up numpy from somewhere other than the blender folder.
Member

Don't Install Blender, try the portable build instead.
https://www.blender.org/download/Blender2.82/blender-2.82-windows64.zip/
Open the folder and check to see if
_multiarray_umath.cp37-win_amd64.pyd

exists in

C:\Users\OddyF\Desktop\blender-2.82-windows64\2.82\python\lib\site-packages\numpy\core

(assuming that you save it to the Desktop of course)

_multiarray_umath.cp37-win_amd64.pyd.jpg

Don't Install Blender, try the portable build instead. https://www.blender.org/download/Blender2.82/blender-2.82-windows64.zip/ Open the folder and check to see if `_multiarray_umath.cp37-win_amd64.pyd` exists in `C:\Users\OddyF\Desktop\blender-2.82-windows64\2.82\python\lib\site-packages\numpy\core` (assuming that you save it to the Desktop of course) ![_multiarray_umath.cp37-win_amd64.pyd.jpg](https://archive.blender.org/developer/F8349081/_multiarray_umath.cp37-win_amd64.pyd.jpg)

It may be worth trying Blender 2.83, which has changes to ignore Python environment variables:
https://builder.blender.org/download/

Possibly there are other Python environment variables than PYTHONPATH causing problems.

It may be worth trying Blender 2.83, which has changes to ignore Python environment variables: https://builder.blender.org/download/ Possibly there are other Python environment variables than `PYTHONPATH` causing problems.
Author

I've downloaded the portable to desktop, unzipped and verified there is indeed the numpy multiarray as seen in the attached images (if I can attach them).Image2.png

Image1.png

Still get the same error when trying to import aud

I've downloaded the portable to desktop, unzipped and verified there is indeed the numpy multiarray as seen in the attached images (if I can attach them).![Image2.png](https://archive.blender.org/developer/F8349222/Image2.png) ![Image1.png](https://archive.blender.org/developer/F8349223/Image1.png) Still get the same error when trying to import aud
Author

Same exact thing with 2.83, file is included, import fails. =c

Same exact thing with 2.83, file is included, import fails. =c
Member

can you trace the process with process monitor and validate that the _multiarray_umath.cp37-win_amd64.pyd file is actually being read from the blender folder and not some other place?

can you trace the process with process monitor and validate that the `_multiarray_umath.cp37-win_amd64.pyd` file is actually being read from the blender folder and not some other place?
Author

Don't know that program at all, but here's what I could find when trying to import numpy, it seems to still be sourcing from another installation of python, but you might know better.

Image3.png

Don't know that program at all, but here's what I could find when trying to import numpy, it seems to still be sourcing from another installation of python, but you might know better. ![Image3.png](https://archive.blender.org/developer/F8349303/Image3.png)
Author

I've scrubbed every instance of python on my computer and removed all python pointers in my environment variables and path, then restarted for good measure.

Tested now on only the portable build, but I can now import aud properly, and install and enable the addon.

Judging by the process monitor, I assume we will conclude that Blender was loading python scripts from a path library instead of its default library?

In any case, I can now import properly so this can be closed unless there is further data needed to fix this from happening in the future.

I've scrubbed every instance of python on my computer and removed all python pointers in my environment variables and path, then restarted for good measure. Tested now on only the portable build, but I can now import aud properly, and install and enable the addon. Judging by the process monitor, I assume we will conclude that Blender was loading python scripts from a path library instead of its default library? In any case, I can now import properly so this can be closed unless there is further data needed to fix this from happening in the future.
Member

Judging by the process monitor, I assume we will conclude that Blender was loading python scripts from a path library instead of its default library?

it definitely was, and it was not a version compatible with blender.

We should have put a stop to picking up python stuff from the environment in the daily builds, but it somehow still found a way, you don't happen to remember the environment variables you scrubbed do you?

> Judging by the process monitor, I assume we will conclude that Blender was loading python scripts from a path library instead of its default library? it definitely was, and it was not a version compatible with blender. We should have put a stop to picking up python stuff from the environment in the daily builds, but it somehow still found a way, you don't happen to remember the environment variables you scrubbed do you?

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Files from the appdata directory may be loaded because of this:
https://docs.python.org/3/library/site.html#site.USER_SITE

I think we should disable the user site by default as well.
https://docs.python.org/3/c-api/init.html#c.Py_NoUserSiteDirectory

Files from the appdata directory may be loaded because of this: https://docs.python.org/3/library/site.html#site.USER_SITE I think we should disable the user site by default as well. https://docs.python.org/3/c-api/init.html#c.Py_NoUserSiteDirectory
Author

Honestly, I took everything python related out of my system variable path in my environment variables. I had already uninstalled python, but its files still existed on my hard drive and so did the system variable pointing to them. (I believe Anaconda which installed python 3.7 for me automatically adds this pointer to the path)

Once I took the pointer out of my system variables, I believe importing inside Blender worked.

This seems like a terrible solution, since I imagine plenty of people have python installed alongside Blender, though I haven't seen any other tickets having the same issue I did here. Leads me to believe it's an isolated issue with something in my setup.

Honestly, I took everything python related out of my system variable path in my environment variables. I had already uninstalled python, but its files still existed on my hard drive and so did the system variable pointing to them. (I believe Anaconda which installed python 3.7 for me automatically adds this pointer to the path) Once I took the pointer out of my system variables, I believe importing inside Blender worked. This seems like a terrible solution, since I imagine plenty of people have python installed alongside Blender, though I haven't seen any other tickets having the same issue I did here. Leads me to believe it's an isolated issue with something in my setup.
Member

This seems like a terrible solution, since I imagine plenty of people have python installed alongside Blender

@Oddyfox The solution from the Blender side of things is to make Blender's embedded Python only use the libraries that are compatible. It seems (from Brecht's comment) we can tell Blender to ignore those system path variables pointing to other libraries, or tell it to specifically look only in specific places (someone's suggestion elsewhere).

I had already uninstalled python, but its files still existed on my hard drive and so did the system variable pointing to them. (I believe Anaconda which installed python 3.7 for me automatically adds this pointer to the path).

From https://docs.anaconda.com/anaconda/install/windows/

  1. Choose whether to add Anaconda to your PATH environment variable. We recommend not adding Anaconda to the PATH environment variable, since this can interfere with other software. Instead, use Anaconda software by opening Anaconda Navigator or the Anaconda Prompt from the Start Menu.
  1. Choose whether to register Anaconda as your default Python. Unless you plan on installing and running multiple versions of Anaconda or multiple versions of Python, accept the default and leave this box checked.

Bolding mine.

When installing Anaconda, it seems like both of those boxes should be unchecked.

though I haven't seen any other tickets having the same issue I did here. Leads me to believe it's an isolated issue with something in my setup.

Perhaps you installed with those boxes checked and other's didn't?

>This seems like a terrible solution, since I imagine plenty of people have python installed alongside Blender @Oddyfox The solution from the Blender side of things is to make Blender's embedded Python only use the libraries that are compatible. It seems (from Brecht's comment) we can tell Blender to ignore those system path variables pointing to other libraries, or tell it to specifically look only in specific places (someone's suggestion elsewhere). >I had already uninstalled python, but its files still existed on my hard drive and so did the system variable pointing to them. (I believe Anaconda which installed python 3.7 for me automatically adds this pointer to the path). From https://docs.anaconda.com/anaconda/install/windows/ >8. Choose whether to add Anaconda to your PATH environment variable. We recommend **not** adding Anaconda to the PATH environment variable, since this can interfere with other software. Instead, use Anaconda software by opening Anaconda Navigator or the Anaconda Prompt from the Start Menu. >9. Choose whether to register Anaconda as your default Python. Unless you plan on installing and running multiple versions of Anaconda or **multiple versions of Python**, accept the default and leave this box checked. Bolding mine. When installing Anaconda, it seems like both of those boxes should be unchecked. >though I haven't seen any other tickets having the same issue I did here. Leads me to believe it's an isolated issue with something in my setup. Perhaps you installed with those boxes checked and other's didn't?

This issue was referenced by 79a58eef05

This issue was referenced by 79a58eef059ffc3f12d11bd68938cfb1b4cd2462

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-04-16 16:06:28 +02:00
david_d_costa commented 2022-06-22 10:46:35 +02:00 (Migrated from localhost:3001)

Added subscriber: @david_d_costa

Added subscriber: @david_d_costa
david_d_costa commented 2022-06-22 10:46:35 +02:00 (Migrated from localhost:3001)

This comment was removed by @david_d_costa

*This comment was removed by @david_d_costa*
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73977
No description provided.