module import problem

Matt Nordhoff mnordhoff at mattnordhoff.com
Sun May 25 01:19:49 EDT 2008


Milos Prudek wrote:
> I have a Kubuntu upgrade script that fails to run:
> 
> File "/tmp/kde-root//DistUpgradeFetcherCore.py", 
> line 34, in <module>
> import GnuPGInterface
> ImportError
> No module named GnuPGInterface
> 
> I got a folder /usr/share/python-support/python-gnupginterface with 
> a "GnuPGInterface.py" but no __init__.py.
> 
> In python command line, print sys.path shows that /usr/share/python-support/ 
> is not among python paths.
> 
> If I cd into /usr/share/python-support/python-gnupginterface and launch Python 
> I can "import GnuPGInterface". But when I run DistUpgradeFetcherCore.py in 
> that folder it always fails with No module named GnuPGInterface.
> 
>  I do not know much about setting python path. 

This doesn't help solve your problem, but /usr/share/python-support
doesn't need to be in Python's path because python-support puts symlinks
to it in /usr/share/python*/site-packages.
-- 



More information about the Python-list mailing list