// Error: No module named pyparsing
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# ImportError: No module named pyparsing //
How can I check the paths that Maya is looking for these modules in ? Here is my PYHONPATH
PYTHONPATH=%PYTHONPATH%;%MAYA_LOCATION%;c:\Python27;C:\Python27\lib;C:\Python27\Lib\site-packages
PyParsing is within C:\Python27\Lib\site-packages
Thanks .... yet again !!
If you use python eggs (as opposed to normal package sub directories) and have a bunch of them in a location, then the site/pth process will end up expanding your PYTHONPATH to have all those eggs in there.
You can control your custom Maya environment either with a wrapper to launch Maya, or from your userSetup.py in your prefs scripts location to configure the environment.
--
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/19519f87-ca61-4bc2-9dd1-974c9e0d11b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/7bf3c87a-5683-41c1-9808-75c5b6e2bb7a%40googlegroups.com.
// Error: DLL load failed: The specified module could not be found.
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# File "C:\Python27\Lib\site-packages\numpy\__init__.py", line 168, in <module>
# from . import add_newdocs
# File "C:\Python27\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
# from numpy.lib import add_newdoc
# File "C:\Python27\Lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
# from .type_check import *
# File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
# import numpy.core.numeric as _nx
# File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 6, in <module>
# from . import multiarray
# ImportError: DLL load failed: The specified module could not be found. //
I confirmed that 'C:\\Python27\\Lib\\site-packages' is indeed in my sys.path using 'print sys.path'
On Windows, Maya is using a Python version compiled with a different compiler than the version you get from Python.org; Visual Studio 2010 as opposed to Visual Studio 2008. You’ll have to get a version of numpy compiled with 2010 if you need it to work from within Maya. You can get the version by looking at the initial text you get when launching the interpreter, e.g. this means VS2008:
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
MSC v.1500 means VS2008, whereas MSC v.1600 means VS2010.
--
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.To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/53CFC78E.5070408%40hybride.com.
On Windows, Maya is using a Python version compiled with a different compiler than the version you get from Python.org; Visual Studio 2010 as opposed to Visual Studio 2008. You’ll have to get a version of numpy compiled with 2010 if you need it to work from within Maya. You can get the version by looking at the initial text you get when launching the interpreter, e.g. this means VS2008:
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win 32 Type "help", "copyright", "credits" or "license" for more information.
MSC v.1500 means VS2008, whereas MSC v.1600 means VS2010.
On 23 July 2014 15:32, Eric Thivierge <ethiv...@hybride.com> wrote:
Are you sure you got the correct version for your Python version?
import sys
print sys.version
Does that match the version of numpy you grabbed? I'm guessing the numpy installer would check for compatibility though...
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/53CFC78E.5070408%40hybride.com.
Or just used the system’s python? :)
I think he’s referring to importing modules within Maya.
So … i guess this means i have to search out libraries and Python2.7 that have been recompiled using VS2012 ?
Yeah, it’s quite an effort. You’ll have to maintain separate PYTHONPATHs per compiler of Python, I’m not sure there’s any way around it. As you can see, Maya’s keen on non-standard compilers and for you this means you’ll have to maintain non-standard versions of your python libraries that involve binaries.
Here’s one way you could achieve it:
win32/
msc1500/
numpy
msc1600/
numpy
darwin/
numpy
Which is added to sys.path upon load, depending on the environment; Windows versus Linux, Maya versus non-Maya and so on.
import sys
if sys.platform == 'win32':
if "MSC v.1500' in sys.version:
sys.path.insert(0, 'win32/msc1500')
if "MSC v.1600' in sys.version:
sys.path.insert(0, 'win32/msc1600')
Thing to note thought is that this is only really relevant when your packages involve binaries; as they are platform dependent. An easier method may be to try and find pure-python equivalents of the libraries you need. In the case of numpy however I’m not sure one exists.
--
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.To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/53CFD5EE.5040209%40hybride.com.
I have to say that Windows is the most complicated out of the platforms, when dealing with compiled python extension compatibility in Maya.
Osx/Linux are far easier to end up with standard compiled extensions that work within Maya.
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/CAFRtmOCK_ze9OYPJPZrd7VJPjgK%2B9Q2EcLVdsWmR7vP2nRmdHA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2Z%2Bfx_Kfxisd_WDJ7-NHeWu%3DYJQyexD6LJMOnRhtCy%2BQ%40mail.gmail.com.