LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I change python search path (http://www.linuxquestions.org/questions/linux-software-2/how-do-i-change-python-search-path-107328/)

Giallo998 10-22-2003 07:45 PM

How do I change python search path
 
Trying to get psyslsk to run. Got python, and the wxpythongtk installed, but python can't seem to find the wxmodules, ex:

[root@localhost pyslsk-1.2.4a]# python ./pyslsk
Can not find wxPython modules. Either wxPython is not
installed, or it's not in Python's module search path (it could be built
for a different version of python interpreter for example). The current
search path is
['/home/nick/progs/pyslsk-1.2.4a', '/usr/local/lib/python23.zip', '/usr/local/li
b/python2.3', '/usr/local/lib/python2.3/plat-linux2', '/usr/local/lib/python2.3/
lib-tk', '/usr/local/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-
packages']
[root@localhost pyslsk-1.2.4a]#

I know I installed the wxPython files, but I don't know where they installed to, nor how to change the python search path. Any help?? thanks in advance.:newbie:

smokybobo 10-22-2003 08:27 PM

How did you install the wxPython bindings? By rpm?

As for once you know where the modules are located, you can stick something similar to the following example in $HOME/.bash_profile (or whatever the similar syntax is for your particular shell's startup scripts):

Code:

export PYTHONPATH=$PYTHONPATH:$HOME/lib/python:$HOME/lib/misc
If you are at all interested in python programming, you might want the actual explanation from the python docs. Read the description for 'path' in the sys module:

http://www.python.org/doc/2.3.2/lib/module-sys.html


All times are GMT -5. The time now is 03:58 AM.