Can only import select as root?
Bruce Elrick
belrick at home.com
Thu Apr 19 22:28:22 EDT 2001
At first blush I'd say that as user mccann you don't have read
permission on one of the directories in the library path (PYTHONPATH)
"Lester I. McCann" wrote:
>
> I'm new to Python, just installed Python 2.1 from the source RPMs, and
> tried to run a program. It runs from root, but fails when run from a
> normal user account. I reduced the problem to something easily
> demonstrated:
>
> [root]# python
> Python 2.1 (#2, Apr 19 2001, 16:57:12)
> [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import select
> >>>
>
> As you can see, it imports select just fine. But as myself:
>
> [mccann]$ python
> Python 2.1 (#2, Apr 19 2001, 16:57:12)
> [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import select
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named select
> >>>
>
> PYTHONPATH is set the same in each environment. My system is RedHat
> 6.2, and the source RPMs are those from
> http://www.python.org/2.1/rpms.html.
>
> What am I doing incorrectly? Why doesn't the normal installation work
> for a normal user account? Thanks for any suggestions.
>
More information about the Python-list
mailing list