How to install numpy in Maya?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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. # "