PDA

View Full Version : Lightwave ignore other installed Python installs



xchrisx
03-21-2013, 10:39 AM
Anyone have a way of essentially hiding the other versions of python from Lightwave? I run Python 2.6 for various other 3D apps and since LW is the only one that requires 2.7 I was hoping of a way of hiding the other install from it without wiping my Environment Variables (windows). Currently it detects the other installs and throws more errors due to it not being 2.7. I have also tried to use "set path=" and lightwave doenst like that :( Any info would be greatly appreciated :)

Thanks
Chris

iain_r
03-21-2013, 11:45 AM
Hi Chris,

There is a variable PYTHONPATH, however this would be global for the user. The "set path" only exists in that session of the command prompt. You could write a batch script to set the PYTHONPATH variable and start lightwave/modeler from that file. I don't set any paths for python on my machine and have 2.6 and 2.7 (lightwave) plus the version with the apprentice version of Houdini. Not had any problems so far, but I've not been doing anything complex.

Regards

Iain.

iain_r
03-21-2013, 11:47 AM
Hi Chris,

There is a variable PYTHONPATH, however this would be global for the user. The "set path" only exists in that session of the command prompt. You could write a batch script to set the PYTHONPATH variable and start lightwave/modeler from that file. I don't set any paths for python on my machine and have 2.6 and 2.7 (lightwave) plus the version with the apprentice version of Houdini. Not had any problems so far, but I've not been doing anything complex.

Regards

Iain.

iain_r
03-21-2013, 12:33 PM
Hi, another thing, you can check the python path. Open the python console in modeler and do import sys, then do help(sys), scroll to the botton and it lists the various paths and the order of any python path variable set. If no PYTHONPATH is set it just has the 2.7 zip.

Regards

Iain

xchrisx
03-21-2013, 01:29 PM
Thanks Iain I will give those suggestions a shot.

Red_Oddity
03-22-2013, 05:21 AM
We gave up on using windows environment variables, with Python they are an endless torrent of troubles (mixing Lightwave, pipeline tools, Maya, Fusion, etc.)
We just set the path during initialization of our Python apps (this also makes it possible to share site-packages and modules for various operating systems from our servers.)

xchrisx
03-22-2013, 09:28 AM
Glad to see I am not the only one suffering from environment issues because it can be quite the headache.

Red_Oddity: In your python scripts (ones being executed outside of Lightwave), is the first line you use set path="C:\Python2.x" followed by sys.path.append for all of the modules you want to load, or do you specify it another way to use a target python install?

Thanks
Chris