Nader Emami wrote: > Tim Golden wrote: >> Nader Emami wrote: >>> L.S., >>> >>> I have installed locally Python-2.4.4 without any problem. Then I >>> would install the "ez_setup.py" to be able using of "easy_install" >>> tool, but I get the next error: >>> >>> %python ez_setup.py >>> Traceback (most recent call last): >>> File "ez_setup.py", line 223, in ? >>> main(sys.argv[1:]) >>> File "ez_setup.py", line 155, in main >>> egg = download_setuptools(version, delay=0) >>> File "ez_setup.py", line 111, in download_setuptools >>> import urllib2, shutil >>> File "/usr/people/emami/lib/python2.4/urllib2.py", line 108, in ? >>> import cookielib >>> File "/usr/people/emami/lib/python2.4/cookielib.py", line 35, in ? >>> from calendar import timegm >>> File "/usr/people/emami/calendar.py", line 23, in ? >>> import pygtk >>> ImportError: No module named pygtk >>> >>> I don't understand what is the problem! Could somebody tell me what I >>> have to do to solve it? >> >> You have a module called "calendar" in your user directory >> /usr/people/emami/calendar.py which is shadowing the stdlib >> calendar module -- which doesn't get used much so you've >> probably never noticed. Either rename your local one or take >> your home folder off the Python path... at least for long enough >> for ez_setup to do its stuff. >> >> TJG > How can do the second solution, (take off the home from Python path)?
Depends on your setup. Since you're on *nix, I can't test whether $HOME is automatically on sys.path (it isn't on Win32). Are you running *in* /usr/people/emami? If so, go somewhere else before you run ez_setup. Check your PYTHONPATH env var; perhaps reset it before running ez_setup. There are other more obscure possibilities to do with things set in site.py but they're less likely. TJG -- http://mail.python.org/mailman/listinfo/python-list