installing external packages into Maya python

180 views
Skip to first unread message

Todd Widup

unread,
Sep 22, 2014, 5:51:16 PM9/22/14
to python_in...@googlegroups.com
hey, I am having a hell of a time with our setup getting this to work.

Is there an easy way to install an external package, such as numpy or PyOpenGL, into Maya's python install?  I am on Windows here.

thanks
-todd

--
Todd Widup
Creature TD / Technical Artist

Justin Israel

unread,
Sep 22, 2014, 6:16:16 PM9/22/14
to python_in...@googlegroups.com
Is there a reason you wouldn't prefer to just add an external path to your environments PYTHONPATH, as opposed to trying to install it into the application location?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35iAtFLOWd5gXshrVcGig5X_29RahBJR59agZOG3Z_RCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Todd Widup

unread,
Sep 22, 2014, 6:17:56 PM9/22/14
to python_in...@googlegroups.com
ive tried that, and Maya is not picking it up


For more options, visit https://groups.google.com/d/optout.

--
Todd Widup
Creature TD / Technical Artist

Justin Israel

unread,
Sep 22, 2014, 6:20:10 PM9/22/14
to python_in...@googlegroups.com

Well I would suggest focusing on getting that solution working as opposed to switching to installing packages into the Maya application internal paths.

Where are you attempting to set up your environment? Maya.env file?

Todd Widup

unread,
Sep 22, 2014, 6:22:37 PM9/22/14
to python_in...@googlegroups.com
for testing, I am going broad and system env.  finally got one module working...basically I am trying to get some of the Open GL stuff working in API 2.0 and it uses the Python Open GL module.  got it loaded now, but maya is now failing ot load maya.api.OpenMayaUI


For more options, visit https://groups.google.com/d/optout.

Todd Widup

unread,
Sep 22, 2014, 6:26:42 PM9/22/14
to python_in...@googlegroups.com
so according the Maya 2015 docs there should be api 2.0 modules for OpenMayaUI and OpenMayaRender, but they are not in the directory for me..bad install or is anyone else missing them?

kevco...@gmail.com

unread,
Sep 22, 2014, 8:09:20 PM9/22/14
to python_in...@googlegroups.com
I needed to download and install Sp4 before some of the modules I seemed to be missing would load. Not really sure if that the problem your having.

Todd Widup

unread,
Sep 23, 2014, 1:56:17 AM9/23/14
to python_in...@googlegroups.com
ill check that out Kev, thanks

On Mon, Sep 22, 2014 at 5:09 PM, <kevco...@gmail.com> wrote:
I needed to download and install Sp4 before some of the modules I seemed to be missing would load. Not really sure if that the problem your having.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Todd Widup

unread,
Sep 23, 2014, 2:08:10 PM9/23/14
to python_in...@googlegroups.com
ah, this looks like it..I was on source install, because for some reason our person who handles this hasn't downloaded the SPs..trying sp4 out now

Jack Straw

unread,
Oct 8, 2014, 7:06:03 AM10/8/14
to python_in...@googlegroups.com
If the package is pure python, no cpython extensions and compiled files, they should work correctly by just including them in your python path. But if they do have cpython components like numpy or PyOpenGL you will have to compile it for the instance of python that inside Maya and not use a binary installer. Now this is actually way harder than you would think because Autodesk compile their version of python with a different version of MSVC than the standalone Python environment (Python 2.7 standalone uses MSVC 2008, Maya 2013 uses 2.6.4 compiled with MSVC 2010 SP1, Maya 2014 uses 2.7.3 compiled with MSVC 2010 SP1 again and Maya 2015 uses 2.7.3 again but compiled with MSVC 2012 Update 4). Also pretty much all python packages that are compiled are only set up for MSVC 2008 and heavy modification of build scripts are required to get it to work. 

Basically, if you can, run the scripts though subprocess in the standalone python so you can use those nice easy binary package installers then read the output back in to the python in Maya. Otherwise good luck with trying to compile it in and give me a shout if you get stuck, I have had to do a couple, normally DB access libs.


On Tuesday, 23 September 2014 19:08:10 UTC+1, todd....@gmail.com wrote:
ah, this looks like it..I was on source install, because for some reason our person who handles this hasn't downloaded the SPs..trying sp4 out now
On Mon, Sep 22, 2014 at 10:56 PM, Todd Widup <todd....@gmail.com> wrote:
ill check that out Kev, thanks
On Mon, Sep 22, 2014 at 5:09 PM, <kevco...@gmail.com> wrote:
I needed to download and install Sp4 before some of the modules I seemed to be missing would load. Not really sure if that the problem your having.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

Justin Israel

unread,
Oct 8, 2014, 2:15:17 PM10/8/14
to python_in...@googlegroups.com

I'm sure this is obvious to most, but I wanted to make sure to point out that this extra complication with compiled python extensions is referring to a Windows environment. The other available platforms don't really share this same level of complication with needing to match a compiler that was used for the specific Autodesk python.
Just making sure to identify the platform specific responses from the general ones.

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8e425663-7f0b-452c-b889-247bd627d045%40googlegroups.com.

Marcus Ottosson

unread,
Oct 8, 2014, 2:16:25 PM10/8/14
to python_in...@googlegroups.com

is referring to a Windows environment.

Windows definitely is the hardest platform for any sort of development.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Reply all
Reply to author
Forward
0 new messages