Numpy 1.13.1 + Scipy 0.19.1 for Maya 2018

python
maya

#1

I needed to compile the latest Numpy and Scipy packages for Maya 2018, and decided to make them available to the community.

The packages were compiled against Visual Studio 2015 (to match 2018’s mayapy.exe) with Intel’s MKL libraries. I make no claim of backwards compatibility, but both packages seem to import fine in previous versions of 64 bit Maya all the way to 2014.

Feel free to grab the wheels here

Enjoy!


#2

Do you know of any guides online that could help me learn how to do this myself? I would like to be able to build the newest version of Numpy and Scipy for Maya 2018 but installing them through pip doesn’t seem to work.


#3

You’ll need to lookup the process of building them from source.
And substitute Maya’s python interpreter mayapy.exe for any references to python itself.
You’ll also need to use the proper version of Visual Studio while doing this, if we’re talking Maya 2018, that would be VS2015.

I’ve looked into Scipy in the past, it is very complex.


#4

Out of curiosity, what are the features present in numpy 1.15.2 you want to leverage?

The reason packages that specifically include .pyd files (python .dll’s) downloaded with pip don’t work with Maya 2018 is because the .pyd’s were compiled with a different environment. Maya 2018 is built with Visual Studio 2015 64bit. Whereas the standard Python 2.7 distribution (and all packages containing .dll’s available through pip) are build with Visual Studio 2008 32 bit.

Because of this building numpy is not easy. Every version of numpy seems to have its own gotchas. There are a lot of dependencies you need to configure (ex: Intel’s MKL libraries). And you need to modify some of Python’s source packages, namely distutils, to get it to build with the right version of Visual Studio.

If you really really want to take a stab at it: This is the closest thing I could find to a guide.

If I have time by the end of the year I’ll take a stab at making a step by step walkthrough.


#5

I want to improve our script for matching an IK spline rig to an FK joint pose with out creating a new curve in Maya. I needed a library to fit cubic curves to points in space and I know SciPy has some libraries for that. If I’m going to use SciPy I need to get it deployed with our tools and make sure I know how to build new versions when we upgrade Maya. It’s a lot of work for a small problem so I’ve given up on it for now.