1
Python / Setting The Environment For Pygtk On Oz Gpe 3.5.4
« on: May 15, 2006, 04:07:43 pm »
I've installed OZ GPE image 3.5.4, build 2006-03-14. I've installed all the relevent python packages for the program I am trying to run.
I have tried several python gtk programs with no success. The one I most desire is straw, an RSS reader. I can run python setup.py build, and it succeeds. When I try to straw I get:
Now I'm pretty certain my immediate problem is that my evironment paths are all wrong. To get this far I had to set PYTHONHOME=/usr/ and I sometimes need to sys.path.append("/folder/"); to add libraries to the search path. This all seems very hackish, and I'm hoping theirs a more appropriate way to fix things so that the imports work.
Can someone help me get my environment set up correctly, and does anyone have any success stories with other PyGTK applications?
Code: [Select]
matt@tosa:/media/cf/Downloads/straw-0.26/src$ ipkg list_installed | grep python
libpython2.4-1.0 - 2.4.2-ml4 -
python-codecs - 2.4.2-ml2 -
python-core - 2.4.2-ml2 -
python-crypt - 2.4.2-ml1 -
python-datetime - 2.4.2-ml1 -
python-distutils - 2.4.2-ml2 -
python-io - 2.4.2-ml2 -
python-lang - 2.4.2-ml1 -
python-logging - 2.4.2-ml1 -
python-math - 2.4.2-ml1 -
python-mime - 2.4.2-ml2 -
python-netclient - 2.4.2-ml2 -
python-pygtk2 - 2.6.2-r2 -
python-pysqlite2 - 2.0.2-ml0 -
python-pyxml - 0.8.3-r0 -
python-re - 2.4.2-ml2 -
python-shell - 2.4.2-ml1 -
python-stringold - 2.4.2-ml2 -
python-textutils - 2.4.2-ml1 -
python-xml - 2.4.2-ml1 -
I have tried several python gtk programs with no success. The one I most desire is straw, an RSS reader. I can run python setup.py build, and it succeeds. When I try to straw I get:
Code: [Select]
matt@tosa:/media/cf/Downloads/straw-0.26/src$ ./straw
Traceback (most recent call last):
File "./straw", line 150, in ?
main()
File "./straw", line 137, in main
run(options)
File "./straw", line 107, in run
from straw import Application, Config
ImportError: No module named straw
and on line 107 you see:Code: [Select]
if ENV_IN_SOURCE:
from lib import Application, Config
else:
from straw import Application, Config
Now I'm pretty certain my immediate problem is that my evironment paths are all wrong. To get this far I had to set PYTHONHOME=/usr/ and I sometimes need to sys.path.append("/folder/"); to add libraries to the search path. This all seems very hackish, and I'm hoping theirs a more appropriate way to fix things so that the imports work.
Can someone help me get my environment set up correctly, and does anyone have any success stories with other PyGTK applications?