sys.path after python 2.1?

Greg Copeland gtcopeland at earthlink.net
Thu May 17 21:25:31 EDT 2001


Greg Copeland <gtcopeland at earthlink.net> writes:

> > >I have some old code that fails to.  It says: ImportError: No module named time.
> > >The odd thing is that time is being imported from the socket module.
> > >
> > >I didn't have this problem with 1.5.  What's the deal?  Help!  Where
> > >do I need to make these changes.
> 
> BTW, this issue only exists for 2.1.  I don't have these problems with 1.5,
> 1.6, or 2.0.  They all work great.  2.1 seems badly broken.
> 
> 
> I have reported this bug on Source Forge.  I have searched the FAQs
> and done various web searches on this topic.  I can't seem to find
> anything.  I'm assuming because 2.1 hasn't been out long and few
> people are actually using it yet???

Okay, here's the deal!  I just got it working.  I was reading elsewhere
that someone wasn't able to import a module unless they were root.  I
immediately realized that I hadn't verified the permissions on the modules.
Sure enough, they were root.root with 0700.  I changed them to 0755 and
BAM!!!!  Everything now works.

So, I guess I am retracting my main complaint.  Clearly 2.1 of Python is
not horribly broken.  Having said that, the install needs to make sure it
installs the shared libraries with the proper permissions!  Also, it would
be nice if Python was smart enough to know the difference between a module
that it can't find and a module that it can't load.  Clearly these are two
different things.  In fact, if it had accurately reported the difference,
I could of had it fixed within seconds of trying it!

This also explains why all of the tests passed.  This is because when they
are sitting in the my user directory, that is, the user that I built it
with, I had the required permissions to access.  It's only after the
install that they get messed up.

Thanks!!!!

Python rocks!!!

-- 
Greg Copeland, Principal Consultant
Copeland Computer Consulting
--------------------------------------------------
PGP/GPG Key at http://www.keyserver.net
DE5E 6F1D 0B51 6758 A5D7  7DFE D785 A386 BD11 4FCD
--------------------------------------------------



More information about the Python-list mailing list