How to install numpy in Maya?

How to install numpy in Maya?

Anonymous
Not applicable
4,436 Views
2 Replies
Message 1 of 3

How to install numpy in Maya?

Anonymous
Not applicable

Hi, I have some problems when installing the numpy in Maya 2015. How to install this python package correctly?

 

I've used easy_install for this python package. The commands in Windows cmd are written as:

"...\Maya2015\bin\mayapy.exe ...\setyptools-38.2.4\easy_install.py numpy". More details are referred in http://jensvhansen.com/installing-new-packages-for-maya-python/

 

I notice that the numpy folder is installed at "...\Maya2015\Python\Lib\site-packages\numpy_1.14.0rc1-py2.7-win-amd64.egg". But when I entered "import numpy" in mayapy.exe, it turner out that "Original error was: DLL load failed: %1 is not a valid Win32 application."

 

When I enter the "Import numpy" in Script Editor in Maya, the information shows that:

"# Error: line 1: Error in maya.utils._guiExceptHook:
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\maya\utils.py", line 318, in formatGuiException
# exceptionMsg = unicode(exceptionObject.args[0])
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 298: ordinal not in range(128)
# 
# Original exception was:
# Traceback (most recent call last):
# File "<maya console>", line 2, in <module>
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\numpy-1.14.0rc1-py2.7-win-amd64.egg\numpy\__init__.py", line 142, in <module>
# from . import add_newdocs
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\numpy-1.14.0rc1-py2.7-win-amd64.egg\numpy\add_newdocs.py", line 13, in <module>
# from numpy.lib import add_newdoc
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\numpy-1.14.0rc1-py2.7-win-amd64.egg\numpy\lib\__init__.py", line 8, in <module>
# from .type_check import *
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\numpy-1.14.0rc1-py2.7-win-amd64.egg\numpy\lib\type_check.py", line 11, in <module>
# import numpy.core.numeric as _nx
# File "E:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\numpy-1.14.0rc1-py2.7-win-amd64.egg\numpy\core\__init__.py", line 26, in <module>
# raise ImportError(msg)
# ImportError: 
# Importing the multiarray numpy extension module failed. Most
# likely you are trying to import a failed build of numpy.
# If you're working with a numpy git repo, try `git clean -xdf` (removes all
# files not under version control). Otherwise reinstall numpy.
# 
# Original error was: DLL load failed: %1 is not a valid Win32 application. # "

0 Likes
4,437 Views
2 Replies
Replies (2)
Message 2 of 3

sean.heasley
Alumni
Alumni

Hi @Anonymous and welcome to the community!

 

There was another thread with this issue and the OP made a full guide you can find here!

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

0 Likes
Message 3 of 3

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Just wanted to check in to see how things were going. Did the suggestion I provided help at all?


If so, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

0 Likes