can use NumPy and SciPy in maya?

2,596 views
Skip to first unread message

rais

unread,
Oct 17, 2011, 5:42:48 AM10/17/11
to python_inside_maya
is anybody successful installation NumPy and SciPy in maya on
windows?

i try but don't work

brando...@gmail.com

unread,
Oct 17, 2011, 11:57:17 AM10/17/11
to python_in...@googlegroups.com

I got numpy working in maya on a linux rig...I just copied all the numpy stuff into a numpy folder in the maya site packages directory...can't imagine it being any different on a windows install...

--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

sh...@pyrokinesis.co.nz

unread,
Oct 17, 2011, 9:31:09 PM10/17/11
to python_in...@googlegroups.com
Just add the path to your PYTHONPATH... Done :)


--
Shaun Friedberg(Pyrokinesis)
http://www.pyrokinesis.co.nz
"Fire Is Fun, When You Think About It"

rais

unread,
Oct 18, 2011, 3:58:15 AM10/18/11
to python_inside_maya
in NumPy office website, have a Documentation talk that :

As pointed out in Installing_SciPy/BuildingGeneral, building Numpy and
Scipy requires a C compiler. Furthermore, a Fortran 77 compiler is
needed to build Scipy and to build a Lapack library for use in Numpy
and Scipy.
The MinGW project provides windows versions of the free GNU compilers
gcc and g77. These are the compilers most Scipy developers work with
and hence the compilers that are supported the best by the Scipy build
scripts.
Cygwin is a Posix compatible Linux-like environment for Windows. It is
a very useful tool as it allows to compile and use many Unix tools
without modification. We'll need it for the compilation of ATLAS. If
selected during installation, Cygwin also makes available its own
versions of the MinGW compilers (by the command line option "-mno-
cygwin" to gcc), which produce identical code. There is no need to
install the separate MinGW distribution when Cygwin is already
installed.
Scipy also supports Visual C++ (MSVC) as the C/C++ compiler (currently
only Numpy compiles without a modification). If one wants to build
extension modules for the official binary distribution of Python, the
runtime libraries have to be compatible. As the official versions of
Python 2.3/2.4/2.5 are compiled with Visual Studio 2003 (Visual Studio
7.1) and hence linked to msvcr71, this leaves only MSVC 7.1 to build
extensions for these Python versions. This pretty much excludes the
free (as in beer) Visual Studio 2005 Express, at least if one doesn't
also want to build Python (and all other extension modules) from
sources with MSVC 8 - which currently is not offically supported.
Combining MSVC with G77 from MinGW or Cygwin is supported, as is the
combination with other Fortran compilers. [Could someone say something
about Intel Fortran?]

I want compiles use vs2008,and I got error message like that:
=====================================================
No module named msvccompiler in numpy.distutils; trying from distutils
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
=====================================================


and last at Traceback message:
=====================================================
numpy.distutils.fcompiler.CompilerNotFound: gnu95: f90 nor f77
=====================================================

i think i must have
> Shaun Friedberg(Pyrokinesis)http://www.pyrokinesis.co.nz

rais

unread,
Oct 18, 2011, 4:00:25 AM10/18/11
to python_inside_maya
i think i must have MinGW or Cygwin?

rais

unread,
Oct 18, 2011, 4:13:09 AM10/18/11
to python_inside_maya
Post address :http://www.scipy.org/Installing_SciPy/Windows
nausea, too complex...

rais

unread,
Oct 18, 2011, 6:03:41 AM10/18/11
to python_inside_maya
Thanks all guys, I installed the binary version of the NumPy,it must
confirmation the environment of regedit on windows that have a key for
maya Python installation path.

their is a py script to register Python 2.0 or later for use with
win32all
and other extensions that require Python registry settings

http://pastebin.com/0JsJb0Rp

ArrantSquid

unread,
Oct 18, 2011, 11:19:58 PM10/18/11
to python_inside_maya
Wish I would have seen this earlier, but here's some info I wrote up
about using numpy with Maya (I used it quite a bit in the past).

http://animateshmanimate.com/2011/03/30/python-numpy-and-maya-osx-and-windows/

闫刚

unread,
Feb 3, 2015, 9:04:04 PM2/3/15
to python_in...@googlegroups.com
You need install vs20XX, the same version of Maya, intel C++ compiler, and config some lib, compile and install with the source.

在 2011年10月17日星期一 UTC+8下午5:42:48,rais写道:

eric.v...@gmail.com

unread,
Aug 27, 2015, 8:42:39 PM8/27/15
to Python Programming for Autodesk Maya
For Maya 2014 and up what you need is a full version of Python 2.7 compiled against MSVC2010 from where you can then build python packages with .dll dependencies (like scipy). Luckily, someone has done the hard work of explaining how to do this here:

http://p-nand-q.com/python/building-python-27-with-vs2010.html

The author goes in lengths discussing the reasons you'd want to do this and the step required to proceed. He also provides you with prebuilt binaries, which is really nice.

Once you have a stable MSVC2010 version of python2.7 64 bit running, you should be able to build python wheels with .dll dependencies:

http://pythonwheels.com

The best part of python wheels is that it lets you install a C extension with no compilers. So, now you can now use your new VS2010 version of pip to install numpy, scipy, and other python packages you want, which should work with mayapy.

To save you some work, feel free to go ahead and grab the builds I currently use here:

https://drive.google.com/folderview?id=0BwsYd1k8t0lEfjJqV21yTnd2elVhNXEyTXhHclhxbDhvWVF5WWZUeVFISWViaFh1TzhrNTQ&usp=sharing


Cheers!

Aton Lerin

unread,
Aug 29, 2015, 11:55:20 AM8/29/15
to Python Programming for Autodesk Maya, eric.v...@gmail.com
Thank you (very) much Eric for this post, and your links to the builds ! Your strategy make a lot sense it save time as well. +1.
Reply all
Reply to author
Forward
0 new messages