Telling blender vhere to find python...

Hello,

I’ve got a little problem. I’m not root on my computer, and the python version installed is 2.1.3. I’ve installed python 2.3.4, but blender does not seems to find it because I can not compile python script. Usually I receive this message:
“ImportError: No module named math”

I don’t understand because “math” is already defined in python 2.1.3.

But blender seems to use another version of python, that is: 2.3.2, which is not installed on my computer.

So how can I tell blender to use python 2.3.4?

In the documentation there is:
“Even if you do have the right version of Python installed you may need to tell the embedded Python interpreter where the installation is. To do that it’s enough to set a system variable called PYTHON to the full path to the stand-alone Python executable”.

But I don’t know how.

I’m using linux and blender 2.34.

And I can’t compile the cvs version of blender (because I’m not root).

So How can I do? Thank you.

Pull down the top of the Blender screen, (move your mouse cursor to the top and it will change to an up & down arrow), and then you will see a whole bunch of settings options.

Got to the Paths section and set your Python path.

That should do it.

BgDM

I’ve already tried but it doesn’t work. I think that it tells where blender should look for python script, but not where to look to find the python executable.

No, that definitely tells where to find the executable. You just have to make sure you put the complete path in there.

BgDM

Have you done this correctly?

https://blenderartists.org/forum/viewtopic.php?t=7723

I don’t know, it doesn’t work. Maybe I must change the name of the executable. It is “python” and maybe I must change it to “python-2.3.4” or something like it, no?

Thank you very much. I’ve add pythonpath and pythonhome to .cshrc and it works perfectly.

Just for the record:

Blender uses Python 2.3.x.

Blender does not use an installed Python executable. A Python interpreter (probably version 2.3.2) is built in.

Blender can use modules from your installed Python if you set the path variables correctly. Sticky threads here on elysiun tell how to do that if needed. Or you can set sys.path inside a script.