python modules

342 views
Skip to first unread message

Todd Widup

unread,
Jan 6, 2016, 4:44:39 PM1/6/16
to python_in...@googlegroups.com
so...how do I get site packages, like Pip and P4Python installed correctly for Maya Py to see and use?  
can they just sit in the local system install and scripts directory (the default Python27 install that is) or do they have to be in the Maya python dir int eh maya install dir?


--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

Justin Israel

unread,
Jan 6, 2016, 4:50:45 PM1/6/16
to python_in...@googlegroups.com
Just add extra paths to your PYTHONPATH in the Maya.env or sys.path in userSetup.py?

--
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/CABBPk37YMT6%3Dq2L68zrhuWhnsPjTj3xC2C_zO45%2BunFF_d0Eyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Todd Widup

unread,
Jan 6, 2016, 4:55:09 PM1/6/16
to python_in...@googlegroups.com
ok, was hoping that would work for those..though there seems to be an issue with the P4 one I got



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

Todd Widup

unread,
Jan 6, 2016, 6:05:32 PM1/6/16
to python_in...@googlegroups.com
so Pip and P4python are already installed on my Python 27 install.. my dirs for Python27 and Python27/Scripts are already in my path.  both of course load and work fine in a standalone Python, but not in Maya..Maya does not see them..this is a more accurate question.

How do you get Maya Python to see/use modules that are installed to teh lib/site-package director of a python 27 install.  

Justin Israel

unread,
Jan 6, 2016, 6:06:52 PM1/6/16
to python_in...@googlegroups.com
Did you update your Maya.env or your userSetup.py to include extra paths?

Todd Widup

unread,
Jan 6, 2016, 6:10:57 PM1/6/16
to python_in...@googlegroups.com
so I have to set the lib/site-package path then.... would be nice if there was an easier way, lol.

ok..now to figure out why standalong works fine for P4Python and why Maya Python wont load it due to some DLL error :(



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

Justin Israel

unread,
Jan 6, 2016, 6:41:51 PM1/6/16
to python_in...@googlegroups.com
I'm not sure how Maya picks up external environments on Windows. But you do have to expand its PYTHOPATH by some means to point at external locations.

As for your perforce module... compiled extensions have to be compiled to match Maya. So you may have to rebuild it against Maya's own python.


Todd Widup

unread,
Jan 6, 2016, 6:51:22 PM1/6/16
to python_in...@googlegroups.com
ok.. will get our engineers to recompile the perforce tools


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

Todd Widup

unread,
Jan 6, 2016, 7:03:49 PM1/6/16
to python_in...@googlegroups.com
hmm...ok, discussing with our engineers...is Maya's Python 32 or 64 bit?

Justin Israel

unread,
Jan 6, 2016, 7:28:25 PM1/6/16
to python_in...@googlegroups.com
Should be 64-bit for any of the recent versions of Maya. What should actually matter is that it is build with the matching compiler for the particular Maya version. 

Antonio Govela

unread,
Feb 11, 2016, 5:25:23 PM2/11/16
to Python Programming for Autodesk Maya
Hey Justin, was this resolved? I have a similar issue with Python2.7 , P4 python  and Maya 2016.
I can import P4 just fine through a python shell, but not through Maya, I've added the path to my PYTHONPATH env variable with no luck.
It seems to import P4.py and then in line 410 "import P4API" i get the DLL load failed, cant find the specified file. Maybe it's compiled for the wrong version? but how come I can run it through shell?

Also how could I make P4Python accessible throughout the network to deploy tools like animation exporters with P4 checkout options to other 
workstations..

 I also tried something like this:
import sys
path = "C:\\Python27\\Lib\\site-packages"
if path not in sys.path:
sys.path.append(path)
import P4

and I get this:

# File "<maya console>", line 9, in <module>

# File "C:\Python27\Lib\site-packages\P4.py", line 410, in <module>

# import P4API

# ImportError: DLL load failed: The specified module could not be found. //


but I can see the "P4API.pyd" in the folder ..    :/

Thanks!

# File "\\newcastle\Tools\SDK\Maya\Tools\Python27\Lib\site-packages\P4.py", line 410, in <module>

# import P4API

# ImportError: DLL load failed: The specified module could not be found. //

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
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



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

--
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.

--
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.

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



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

--
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.

--
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



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

--
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

unread,
Feb 11, 2016, 5:42:58 PM2/11/16
to python_in...@googlegroups.com
nope...never got this resolved.  

same issue for me, just havent had time to get back and resolve it as its not a vital issue for us right now

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
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.



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

--
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.

--
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.

--
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.

--
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.



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com



--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

--
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.

--
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/28c59eef-d11f-4d68-aad6-4c233ef69c5d%40googlegroups.com.

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

Robert White

unread,
Feb 11, 2016, 7:22:03 PM2/11/16
to Python Programming for Autodesk Maya
I've got a build of Perforce that should work with both 2015 and 2016, its also compiled with a compatible version of openSSL if your server happens to require that.
Reply all
Reply to author
Forward
0 new messages