Blender cant find python

(JustThisGuy) #1

i’m trying to use the makehuman python scripts with blender but looking at console messages blender doesnt think i have python installed and is crashing when looking for model “os”. Here is the output from blender :

[[email protected] blender-2.37a-linux-glibc2.2.5-i386-static]$ ./blenderstatic
Using Python version 2.3
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
No installed Python found.
Only built-in modules are available.  Some scripts may not run.
Continuing happily.
Traceback (most recent call last):
  File "", line 9, in ?
ImportError: No module named os
Traceback (most recent call last):
  File "", line 13, in ?
NameError: name 'os' is not defined

Blender quit

and here is the relevant results from yum list | grep pythin to prove i have python installed.

[[email protected] blender-2.37a-linux-glibc2.2.5-i386-static]# yum list | grep python [Errno 4] IOError: <urlopen error (113, 'No route to host')>
Trying other mirror.
MySQL-python.i386                        1.2.0-1                installed
dbus-python.i386                         0.33-3                 installed
gnome-python2.i386                       2.10.0-1               installed
gnome-python2-bonobo.i386                2.10.0-1               installed
gnome-python2-canvas.i386                2.10.0-1               installed
gnome-python2-extras.i386                2.10.0-2.1             installed
gnome-python2-gnomevfs.i386              2.10.0-1               installed
gnome-python2-gtkhtml2.i386              2.10.0-2.1             installed
libxml2-python.i386                      2.6.19-1               installed
python.i386                              2.4.1-2                installed
python-devel.i386                        2.4.1-2                installed
python-elementtree.i386                  1.2.6-4                installed
python-ldap.i386                         2.0.6-4                installed
python-sqlite.i386                       1.1.6-1                installed
python-urlgrabber.noarch                 2.9.6-1                installed
rpm-python.i386                          4.4.1-21               installed

can someone help me re. pointing blender at python? is there a config script i have to change or anything? looking at the returns from blender it seems i have to set $PYTHONHOME, but this doesnt help as i dont know what <prefix> and <exec_prefix> mean. So where should i set this? I’m running fedora core 4 on an i386 arch if that helps. I would read the manual only it seems to return python-linked errors so i guess it depends on python.

sorry for being a pain. any help appreciated. :smiley:


(z3r0 d) #2

WHERE do you have python installed?

is it in your path?

have you tried the PYTHON PATH related threads in the python forum?

(stiv) #3

You need to install Python 2.3 for this version of blender. This is the hint:
Using Python version 2.3

(JustThisGuy) #4

I have python 2.4 - ( and looking at the python website, they seem to be built for backwards compatability, though i may be wrong) - But as i see the problem, i still need to set the $PYTHONHOME variable … looking at my /usr/lib, i see these :

[[email protected] Mark]# cd /usr/lib
[[email protected] lib]# ls | grep python
[[email protected] lib]#   

Should i set &PYTHONHOME to one of these? and which ones are my platform-dependant libraries and which are my platform-independant libraries?

(stiv) #5

I have python 2.4

That is lovely, but you need to install Python 2.3 for this version of blender.

The python language is backward compatible. The python libraries are not. Various internal structures change size between versions. Programs like Blender that were built to use a certain version of a library want that version.

Did I mention you need Python 2.3 for this version of Blender?

You can use PYTHONPATH to tell Blender which Python to use if the correct one is not in your PATH.

Python 2.3

If you wait a few weeks, the next version of blender is built for Python 2.4 on most platforms.


(JustThisGuy) #6

sorry. i read the website and made a stupid assumption. :expressionless:

so when i install python 2.3, where do i put the $PYTHONPATH variable? is it /usr/lib/python2.3 , , or what?

sorry for being a stupid pest.



(stiv) #7

sorry for being a stupid pest.

Not a problem!

You may not need to set PYTHONPATH or PYTHONHOME. IIRC, there is a set of known places that Python looks for its files like /usr/lib/python2.3, /usr/local/lib/python2.3, etc. If you do need to set it, it should point at a directory (or list of directories). Not at the which is the actual library file. More info on setting env vars over in the Python forum here.

(JustThisGuy) #8

right. thanks a lot. your help was much appreciated.

Mark <-- just become that little bit less n00by … yay!