Import error depending on where importing from

Jay O'Connor joconnor at cybermesa.com
Sat Aug 31 18:15:29 CEST 2002


I'm having problems importing a module based on where I'm at

For certain reasons, I had to put the MySQLdb files in my own directory
(called 'lib').   Now, when I'm in the lib directory I can import MySQLdb
and use it fine.  However, when I'm one directory up, and I try to do
"from lib import MySQLdb" I get 

>>> from lib import MySQLdb
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "MySQLdb.py", line 19, in ?
ImportError: _mysql: init failed

There is an empty __ini__.py file in lib and _mysql.so is in lib as well

This is on Python 1.5.2

Any idea why the init fails?

Take care,
-- 
Jay O'Connor
joconnor at cybermesa.com
http://www.r4h.org/r4hsoftware



More information about the Python-list mailing list