Mailing List Archive

module import problem
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.

--
Milos Prudek
--
http://mail.python.org/mailman/listinfo/python-list
Re: module import problem [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[ Milos Prudek <prudek@bvx.cz> ]

> 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.

Reinstall the package "python-gnupginterface" with "sudo aptitude reinstall
python-gnupginterface". This should fix the problem, unless your package
management is broken.

- --
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkg4mb0ACgkQn3IEGILecb6jpACfc80saFQz/Q6F5lYbuCUQxJt2
Z+8AoKkB+5hqm0tMmK/d1s1IjsSSCqAz
=Z6/t
-----END PGP SIGNATURE-----
--
http://mail.python.org/mailman/listinfo/python-list
Re: module import problem [ In reply to ]
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.
--
--
http://mail.python.org/mailman/listinfo/python-list
Re: module import problem [ In reply to ]
> Reinstall the package "python-gnupginterface" with "sudo aptitude reinstall

Your advice helped! Upgrade is running now. Thanks!

--
Milos Prudek
--
http://mail.python.org/mailman/listinfo/python-list