[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python problems with a lot of applications.



hallo Axel,

yes i have the file:
nn@Koad:~$ ls -l /usr/bin/python2.5
-rwxr-xr-x 1 root root 1174932 2008-05-15 18:36 /usr/bin/python2.5
nn@Koad:~$

the import seems ok:

nn@Koad:~$ python
Python 2.5.2 (r252:60911, Apr  5 2008, 16:44:07)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append("/var/lib/python-support/python2.5/")
>>> sys.path.append("/var/lib/python-support/python2.5/")
>>> import pygtk
>>> quit()
nn@Koad:~$

nn@Koad:~$ /usr/bin/python2.5
Python 2.5.2 (r252:60911, May 15 2008, 17:59:19)
[GCC 4.3.1 20080501 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0']
>>> import pygtk
>>>
>>> quit()
nn@Koad:~$

the result is :
nn@Koad:~$ gmail-notify
Traceback (most recent call last):
  File "./notifier.py", line 4, in <module>
    import pygtk
ImportError: No module named pygtk
nn@Koad:~$

i tryed reintall python2.5 with:
Koad:~# apt-get --reinstall install python2.5
but the same error


:(




Axel Freyn wrote:
Hi Dark,
On Thu, May 22, 2008 at 04:48:32PM +0100, Dark Nebula wrote:
  
nn@Koad:~$ python
Python 2.5.2 (r252:60911, Apr  5 2008, 16:44:07)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
    
import sys
print sys.path
          
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5',  
'/usr/local/lib/python2.5/plat-linux2',  
'/usr/local/lib/python2.5/lib-tk',  
'/usr/local/lib/python2.5/lib-dynload',  
'/usr/local/lib/python2.5/site-packages']
    
That's strange - on my machine, everything is installed in /usr/lib, not in
/usr/local/lib. Nevertheless, the path is missing, the modules seem to be installed.
If you do in python

import sys
sys.path.append("/var/lib/python-support/python2.5/")
sys.path.append("/usr/lib/python-support/python2.5/")
import pygtk

python should import pygtk, and everything should work.
To make this setting permanent, add the lines

/var/lib/python-support/python2.5
gtk-2.0
/var/lib/python-support/python2.5/gtk-2.0

to the file
/usr/local/lib/python2.5/site-packages/python-support.pth (if it does not exist
already, create it)
This file should be sourced each time python is executed.

But: probably, you should reinstall python, because on my machine, python is
installed in /usr, and not in /usr/local. Do you have /usr/bin/python2.5? What
happens, if you start it, and execute the

import sys
print sys.path
import pygtk

then?

Axel


  


Reply to: