Yes too much thinking, its a problem ;)
Thanks again for the help.

On May 6, 10:49 am, Chad Dombrova <[email protected]> wrote:
> On May 5, 2010, at 10:33 PM, PixelMuncher wrote:
>
> >> i'm curious what would make you think that it would not since that's
> >> what the System Env installation instructions say to do?
>
> > Thanks again Chad:
> > Got it working in both versions, using Maya.env to point the way.
> > That was easy.
>
> glad to hear it.
>
> > The source of my uncertainty about setting the 2011 pymel dir is this:
> > After reading the install instructions, I concluded that there were 2
> > potential places to tell Maya where pymel is located:
> > 1)  Maya.env and
> > 2)  System env
>
> correct.
>
>
>
> > When I decided to setup PyMEL for 2010, I wanted to use a single
> > install, so I looked at the 2011 Maya.env and the system env to see
> > where PyMEL was installed, but neither contained a PYTHONPATH var.
>
> yes, 2011 is a special case because it comes with pymel installed, so there 
> is no need to have it setup via PYTHONPATH.  but if you want to install a new 
> version, the same installation instructions apply.  this could be clarified 
> in the docs.
>
> > Since PyMEL was installed and working w/2011, I assumed that
> > PYTHONPATH for 2011 must be hardwired or buried somewhere where I
> > wouldn't find it.  
>
> mostly right.  sys.path is the end-all / be-all of search paths in python.  
> PYTHONPATH is a user configurable variable that adds to the default set of 
> paths in sys.path.  below i print out both PYTHONPATH and sys.path, so you 
> can see how the user configurable ends up near the top (paths at the top of 
> sys.path get searched first):
>
> import os
> for x in os.environ['PYTHONPATH'].split(':'): print x
> print
> import sys
> for x in sys.path: print x
>
> /Users/chad/Documents/dev/luma/python/thirdParty
> /Users/chad/Documents/dev/luma/python/packages
>
> /Applications/Autodesk/maya2010/Maya.app/Contents/MacOS
> /Users/chad/Documents/dev/luma/python/thirdParty
> /Users/chad/Documents/dev/luma/python/packages
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python26.zip
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/plat-darwin
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/plat-mac
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/plat-mac/lib-scriptpackages
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/lib-tk
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/lib-old
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/lib-dynload
> /Applications/Autodesk/maya2010/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages
> /Users/chad/Library/Preferences/Autodesk/maya/2010/prefs/scripts
> /Users/chad/Library/Preferences/Autodesk/maya/2010/scripts
> /Users/chad/Library/Preferences/Autodesk/maya/scripts
>
> notice all the paths that are inside maya's installation?  the main location 
> for user modules and packages that have been installed for a particular copy 
> of python is the directory that ends in 'site-packages'.  in 2011, that is 
> where pymel resides.  but since paths added via PYTHONPATH supersede the 
> default paths already on sys.path, the manual install method of pymel 
> overrides the native install of pymel.
>
> > Based on that research, it was not clear to me how
> > I could be certain that I could change the PYTHONPATH for 2011 (2011
> > is not mentioned in the docs and it is the first to include PyMEL in
> > the install).  Thus my attempt to point 2010 to the PyMEL install in C:
> > \Program Files\Autodesk\Maya2011\Python...
> > This led to an install problem which led to my request for assistance
> > on this forum.
>
> sounds to me like you outsmarted yourself  :)
>
>
>
> > Your documentation is extremely well written (as good as any I've
> > encountered).  I'm not a professional programmer, so I've gained some
> > insight just reading your higher level explanations like "Why PyMEL"
> > and "Python in Maya Done Right"
>
> > I would still point out that, while I trust your writing and
> > programming, I still don't know beyond a shadow of a doubt that 2010
> > and 2011 are using 1.0.2.  Is there a command to query the pymel
> > version?
>
> import pymel
> print pymel.__version__
>
> -chad
>
> --http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to