[Python-modules-team] Bug#662965: Python doesn't find the connector module -- missing symlinks?
dapal at debian.org
Wed Mar 7 17:30:52 UTC 2012
On Wed, 7 Mar 2012 18:03:17 +0100, Sandro Tosi wrote:
> On Wed, Mar 7, 2012 at 17:29, David Paleino <dapal at debian.org> wrote:
> > after installation of said package, python isn't able to find the module:
> > $ python -c 'import mysql.connector'
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > ImportError: No module named connector
> > $
> that's weird because it works on several of my machines and also in a
> clean pbuilder chroot; have you tried reinstalling it? remove +
> $ python -c 'import mysql.connector as a ; print a.__file__'
> $ readlink -f /usr/lib/pymodules/python2.7/mysql/connector/__init__.py
This is strange indeed, sorry for not checking before: in a clean chroot, it
On my host system, I *do* have /usr/lib/pymodules/.../connector/, but python is
still not seeing it. I'm running it inside an almost-empty /tmp/, so there's no
chance some local mysql/ directory could interfere with it.
Any hint on how to debug what's happening? Some more info:
- in chroot (where it works):
# python -c 'import sys; print "\n".join(sys.path)'
- on my host (where it doesn't work):
$ python -c 'import sys; print "\n".join(sys.path)'
There are obviously more paths (due to more packages being installed), but the
"fundamental" ones are there. Worth noting is that /usr/lib/pymodules/python2.7
is actually in PYTHONPATH, also on my host system!
Any help would be much apreciated, thanks :)
> > Checking "dpkg -L", it seems like the package is missing the symlinks
> > under /usr/lib/python*/*/.
> that's not the problem: python-support creates the symlinks tree at
> install time (via trigger).
Aw, right. Totally forgot it :)
Ciao e grazie,
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: not available
More information about the Python-modules-team