Import Errors

Thomas M. Hermann __tmh at yahoo.com
Sat Oct 27 09:04:54 CEST 2001


On FreeBSD 4.4 with Python 2.1, modules cannot be imported from a
personal site-packages directory. The personal site-packages directory
is located at '/usr/home/thomas/lib/python2.1/site-packages'. The
environmental variable 'PYTHONPATH' is set to the personal
site-packages directory. At the python command prompt, I import sys
and type 'sys.path'. The personal site-packages directory is in
'sys.path', but if an attempt is made to import a module from the 
directory, it fails. To test out the system, I installed the module in
${prefix}/lib/python2.1/site-packages' at which point I was able to
install it. I've checked permissions, which are set to '755' or '644'
as appropriate.

The rub is that there is no reason I should not be able to import the
module from a personal site-packages directory.

Thanks,

Tom H.



More information about the Python-list mailing list