ImportError with extensions in python2.1 installed in home dir

tan at pobox.com tan at pobox.com
Fri Mar 2 17:12:07 EST 2001


folks,

I've installed python 2.1 in my home directory on the web
hosting service I use (because they have no plans to move
from python 1.5.2 to 2.x anytime soon, and I don't have
access to /usr.) Installation succeeds, and modules that
don't import extension modules work fine, but when I try to
import an extension module, I get

ImportError: No module named [name of extension module]

If I uncomment the module in Modules/Setup, the module gets
compiled into libpython2.1.a correctly, I don't get the
error, and the module seems to work as it should.

sys.path is correct (my python2.1 binary is looking for
python2.1, plat-linux2, lib-tk, lib-dynload and
site-packages in the right place.)

The system is:
Linux 2.0.36 i686 unknown

Before I installed python 2.1, I installed a package
(4Suite) that contains a few extension modules and tried using
them with the python1.5 binary in /usr/bin. Same
problem. 

The python1.5 binary can find and run extension modules in
/usr/lib/python1.5/lib-dynload. But neither it nor the
python2.1 binary I compiled can find extension modules in my
home directory tree.

I suppose whenever I add a package I could compile any
extension modules it contains into libpython2.1.a, but I'd
rather not.

What am I missing?

Please cc any replies to tan at pobox.com.

thanks,
Tom
-- 
Tom Newman	  tan at pobox.com




More information about the Python-list mailing list