Changing Python Installation For Maya
Solution 1:
Maya's version of Python (mayapy) is compiled with Visual Studio 2010, Python's 2.7.x standard distribution is compiled with VS2008, and the two aren't compatible. So packages you install via pip in your standard 64 bit Python install won't work with Maya if they have binary dependencies. (ex numpy, scipy, PIL, pandas, etc...)
To test, open a python tab in the script editor and do this:
import sys
print (sys.version)
# Result: 2.7.3 (default, Aug 12012, 16:33:56) [MSC v.160064 bit (AMD64)] #
The part that matters here is in square brackets [MSC v.1600 64 bit (AMD64)]
.
If you do the same in your installed version of Python 2.7.x, you'll see that they won't match.
What you'll need to do is to compile these modules yourself using Visual Studio 2010 + either mayapy or a version of Python specifically built with VS2010. Either way it won't be easy in some cases.
I've made builds of packages I use compatible with Maya 2014-2015-2016 available here. Extract those packages anywhere Maya can see python packages and you should be able to work.
Side note: Maya on OSX doesn't suffer from these compatibility issues.
Post a Comment for "Changing Python Installation For Maya"