problem python

Peter Otten __peter__ at web.de
Wed Jun 6 08:19:07 EDT 2012


Tom King wrote:

> hi im new in python and i have a problem about
> 
> when i type python in my command line console i get an error message
> 
> 'import site' failed; use -v for traceback
> Python 2.4.3 (#1, May  5 2011, 18:44:23)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> 
> 
> 
> what is going on and how i can fix it
> thanks in andvance

Did you write a module site.py yourself? If so rename it and don't forget to 
remove the corresponding site.pyc. If that doesn't help invoke python with

$ python -S

and then import site explicitly in the interactive interpreter:

>>> import site

You should get a traceback. If you cut and paste it and show it to us we 
might tell you more.




More information about the Python-list mailing list