Blender not working with python

And before you ask, yes, I have read the entirety of the Python 101 thread and the “Python Scripting” section of the Blender 2.3 manual.

My setup:
Win2k pro
Python 2.2 (installed in C:\Python22 per default)
Blender 2.33
System variable ‘PYTHONPATH’ is set to:
(User variable ‘PYTHONPATH’ is set the same, just in case.)
Python path set variously to “C:\Python22\LIB” and “C:\Program Files\Blender Foundation\Blender” over the course of my testing, currently set to .

The machine has been rebooted several times since setting the system variable, for reasons not related to this, but as of five minutes ago, still no joy.

The above also did not work with Blender 2.32 when I had that installed.

Also tested installing Python 2.3 and changing the system variable (& rebooting, etc). Nada.

Anyone have a clue for rent?

If you run this script in Blender, what does it output in the console?

import sys
print sys.path


With Blender 2.33 you will want Python 2.3.

Also, fire up python by itself and type Theeth’s script into it to see where python thinks it is.

in 2.3, it’s returning:
[’’, ‘C:\PYTHON23’, ‘C:\PYTHON23\DLLS’, ‘C:\PYTHON23\LIB’, ‘C:\PYTHON23\LIB\LIB-TK’, ‘C:\WINNT\system32\’, C:\Python23\lib\plat-win’, ‘C:\Python23\lib\site-packages’]

My current PYTHONPATH system variable:

No joy. Still cannot get any python scripts to run.

Did you run that from the Python console or from Blender?
What you said leads me to believe you run it in the py console.

Please run it in Blender and post the results.


[‘C:\PYTHON23’, ‘C:\PYTHON23\DLLS’, ‘C:\PYTHON23\LIB’, ‘C:\PYTHON23\LIB\LIB-TK’, ‘C:\Program Files\Blender Foundation\Blender\’, ‘C:\Python23\Lib’, ‘C:\Python23\DLLs’, ‘C:\Python23\Lib\lib-tk’, ‘’, ‘C:\Program Files\Blender Foundation\Blender’, ‘C:\PROGRA~1\BLENDE~1\Blender’, ‘C:\Python23’, ‘C:\Python23\lib\site-packages’, ‘\Program Files\Blender Foundation\Blender\’, ‘C:\Documents and Settings\cohort\Application Data\Blender Foundation\Blender\.blender\scripts’]

That means it’s working.


And yet, still not a single package I’ve downloaded works…

New API? Do they all have to be ported?

import os
print dir(os)[/quote]
If what you posted is correct (points to the right directories), then this should work too. If this works, than pretty much all the scripts should work, except for those that requires python-packages (like CGkit for Blender World Forge).