I've been doing this for sometime with great success. We currently insert pymel (from a network location) to the front of the path with sitecustomize. What is in your sitecustomize.py file? and are you sure that it is being executed?
I have a print at the top of mine which you should see in the output window when you start maya. A nice check is that if that print happens in the script editor it is being executed too late in the process to make a different. Ian On Fri, Feb 5, 2010 at 1:24 PM, Count Zer0 <count....@gmail.com> wrote: > " > Manual Method 4: sitecustomize > > ... > > 4. save this file as sitecustomize.py somewhere in your system python > path. > " > > > Only the default maya install locations, (*) paths, seem to inject > pymel path early enough, so you might as well use Method 3: pymel.pth. > > > (*)C:\Program Files\Autodesk\Maya2008\bin > .. > (*)C:\Program Files\Autodesk\Maya2008\Python\DLLs > (*)C:\Program Files\Autodesk\Maya2008\Python\lib > .. > (*)C:\Program Files\Autodesk\Maya2008\bin > (*)C:\Program Files\Autodesk\Maya2008\Python > (*)C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages > C:/Documents and Settings/jparks/My Documents/maya/2008/prefs/scripts > C:/Documents and Settings/jparks/My Documents/maya/2008/scripts/ > C:/Documents and Settings/jparks/My Documents/maya/scripts > > > > Putthing this in userSetup.mel does not work either: > python("import sys;sys.path.insert(0,'/path/to/top-pymel-dir');"); > > Nor does this in userSetup.mel: > putenv "PYTHONPATH" (`getenv "PYTHONPATH"` + ";/path/to/top-pymel- > dir"); > > Adding PYTHONPATH to Maya.env or the system's environment variable > seems to work, but that is a pain to do w/ install scripts. > > Anybody know how to get pymel path inserted early enough w/ > sitecustomize in a non-Maya install folder? > > -jason > > On Jan 25, 11:50 am, Chad Dombrova <chad...@gmail.com> wrote: >> i hope to have the official docs updated in a few days. in the >> meantime, ian was nice enough to post his instructions here: >> http://github.com/shrtcww/pymel/blob/1e4d2fbab671445b21e89c0c7a6f2b7d... >> >> github automatically turns the restructuredText into html, which is >> awesome. >> >> -chad >> >> On Jan 25, 2010, at 11:47 AM, Drew wrote: >> >> >> >> > Awesome - i've never used sitecustomize before so seeing an example of >> > how to set this up would be great. Thx ian! >> >> > On Jan 21, 6:35 pm, Ian Jones <i...@ambientdivide.com> wrote: >> >> Sure can >> >> >> On Thu, Jan 21, 2010 at 6:21 PM, Chad Dombrova <chad...@gmail.com> >> >> wrote: >> >>> ian, can you provide some instructions on how to set this up that >> >>> we can >> >>> include in the docs? >> >> >>> On Thu, Jan 21, 2010 at 4:51 PM, Ian Jones >> >>> <i...@ambientdivide.com> wrote: >> >> >>>> Drew, >> >> >>>> What I've been doing is using sitecustomize to inject pymel to the >> >>>> front of the python path at startup. The `downside` is that pymel >> >>>> shows up in the python path universally but some of the utils >> >>>> that are >> >>>> included I've been learning/finding great use for in other >> >>>> places. The >> >>>> Path class in particular - love that thing. So it's not really that >> >>>> much of a `downside` after all. >> >> >>>> Ian >> >> >>>> On Thu, Jan 21, 2010 at 12:18 PM, Drew <drewskill...@gmail.com> >> >>>> wrote: >> >>>>> Hi Chad, >> >> >>>>> Thanks to you and Jason for helping me out here. >> >> >>>>> Do you know if .pth files can have env variables in them? Our >> >>>>> pymel >> >>>>> install location will vary from project to project (all project >> >>>>> data >> >>>>> is lumped under a project specific directory), so if i do hack the >> >>>>> maya install it would be great if it could play nice when you're >> >>>>> switching between projects. >> >> >>>>> Even if it does support env vars, i'm still not super comfortable >> >>>>> hacking the maya install itself. I prefer to keep all the maya >> >>>>> customization we do easily tractable from the maya.env. For >> >>>>> example a >> >>>>> tools programmer troubleshooting problems a year from now and not >> >>>>> realizing that custom scripts/plugins are being referenced from >> >>>>> the >> >>>>> install directory itself. That said, it sounds like the .pth is >> >>>>> probably our best option right now. (and fyi - i am using maya >> >>>>> 2008). >> >> >>>>> For the record, my ideal option would be a PYMELPATH env var >> >>>>> (definable either though windows or the maya.env) that makes all >> >>>>> this >> >>>>> magic sauce work. Though I'm sure there are some good reasons why >> >>>>> it's not setup that way. >> >> >>>>> Thx again! >> >>>>> Drew >> >> >>>>> On Jan 20, 11:16 pm, Chad Dombrova <chad...@gmail.com> wrote: >> >>>>>> hi zero, >> >>>>>> we know this ordering can be a bit tricky to accomplish for >> >>>>>> those who >> >>>>>> are not using the "easy" install method, especially on a >> >>>>>> windows machine >> >>>>>> where PYTHONPATH might be set as a system environment variable >> >>>>>> that the user >> >>>>>> cannot override. to help out in these situations, we've added >> >>>>>> a third >> >>>>>> install option to the 1.0 docs, for those who have write access >> >>>>>> to their >> >>>>>> maya site-packages directory: >> >>>>>> http://www.luma-pictures.com/tools/pymel/docs/1.0/install.html#manual >> >>>>>> ... >> >> >>>>>> let us know if that does not solve the problem. there is another >> >>>>>> variant to this 3rd option that we haven't fully explored, but >> >>>>>> it would only >> >>>>>> work for maya 2010, since .pth location restrictions were >> >>>>>> relaxed in python >> >>>>>> 2.6. >> >> >>>>>> -chad >> >> >>>>>> On Jan 20, 2010, at 10:34 PM, Count Zer0 wrote: >> >> >>>>>>> Posting for Drew Skillman of DoubleFine from tech-artists.org >> >>>>>>> forum: >> >> >>>>>>> "We're running into some trouble with the new deployment >> >>>>>>> scheme for >> >>>>>>> 1.0. Specifically, pymel now needs to be imported prior to the >> >>>>>>> maya >> >>>>>>> libs, which means it needs to appear before those maya libs in >> >>>>>>> sys.path. >> >> >>>>>>> This is actually tricky to accomplish if you already have >> >>>>>>> PYTHONPATH >> >>>>>>> defined as an environment variable, and aren't in a position to >> >>>>>>> change >> >>>>>>> it. This is because if PYTHONPATH is defined, adding it to the >> >>>>>>> maya.env does nothing (i'm using maya 2008 and carefully >> >>>>>>> verified >> >>>>>>> this). >> >> >>>>>>> I can move the 2 necessary PyMel folders into the folder that's >> >>>>>>> currently defined in PYTHONPATH, but that's pretty ugly since >> >>>>>>> our >> >>>>>>> maya >> >>>>>>> tools are supposed to live elsewhere (not to mention the >> >>>>>>> confusion of >> >>>>>>> having those 2 folders piled in with a bunch of other modules). >> >> >>>>>>> So my question for you guys is does anyone know another way to >> >>>>>>> get >> >>>>>>> PyMel added to the system paths before the standard maya libs, >> >>>>>>> without >> >>>>>>> relying on PYTHONPATH (or hacking the maya install itself)." >> >> >>>>>>> Any help would be appreciated, I'll post response in other >> >>>>>>> forum if >> >>>>>>> anybody has a good solution. >> >> >>>>>>> -jason >> >>>>>>> -- >> >>>>>>>http://groups.google.com/group/python_inside_maya >> >> >>>>> -- >> >>>>>http://groups.google.com/group/python_inside_maya >> >> >>>> -- >> >>>>http://groups.google.com/group/python_inside_maya >> >> >>> -- >> >>>http://groups.google.com/group/python_inside_maya >> >> > -- >> >http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya > -- http://groups.google.com/group/python_inside_maya