473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ez_setup.py

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?

Regards,
Nader
Feb 26 '07 #1
7 16354
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
Feb 26 '07 #2
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)?

Feb 26 '07 #3
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
Feb 26 '07 #4
Nader Emami wrote:
>>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
I have a Linux and I don't have any PYTHONPTH variable, because if I run
the next command it returns nothig:

%env | grep -i pythonpath or
%env | grep -i python
I'm no expert here, but I believe that Linux is
case-sensitive, so you'd need to do:

env | grep PYTHONPATH

TJG
Feb 26 '07 #5
Nader Emami wrote:
Tim Golden wrote:
>Nader Emami wrote:
>>>>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
I have a Linux and I don't have any PYTHONPTH variable, because if I
run the next command it returns nothig:

%env | grep -i pythonpath or
%env | grep -i python

I'm no expert here, but I believe that Linux is
case-sensitive, so you'd need to do:

env | grep PYTHONPATH

TJG
'grep' with 'i' option can catch both of them. I have done with capital
letters also and the answer stays the same:
%env | grep PYTHONPATH of %env | grep PTYTHON
OK. Keep copying to the list, please. As I said, I'm not
a *nix person (and I'm running here on Windows) so you'll
get a more informed and wider audience from c.l.py.

If there's no PYTHONPATH that means it's just down to
your system setup what goes on the path. Try (from
within the python interpreter):

<code>
import sys
for i in sys.path:
print i

</code>

Do you see your home directory there?

TJG
Feb 26 '07 #6
Nader Emami wrote:
Tim Golden wrote:
>Nader Emami wrote:
>>Tim Golden wrote:
Nader Emami wrote:

>>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
I have a Linux and I don't have any PYTHONPTH variable, because if
I run the next command it returns nothig:
>
%env | grep -i pythonpath or
%env | grep -i python

I'm no expert here, but I believe that Linux is
case-sensitive, so you'd need to do:

env | grep PYTHONPATH

TJG
'grep' with 'i' option can catch both of them. I have done with
capital letters also and the answer stays the same:
%env | grep PYTHONPATH of %env | grep PTYTHON

OK. Keep copying to the list, please. As I said, I'm not
a *nix person (and I'm running here on Windows) so you'll
get a more informed and wider audience from c.l.py.

If there's no PYTHONPATH that means it's just down to
your system setup what goes on the path. Try (from
within the python interpreter):

<code>
import sys
for i in sys.path:
print i

</code>

Do you see your home directory there?

TJG
This is the result of the code:
/usr/people/emami/lib/python24.zip
/usr/people/emami/lib/python2.4
/usr/people/emami/lib/python2.4/plat-linux2
/usr/people/emami/lib/python2.4/lib-tk
/usr/people/emami/lib/python2.4/lib-dynload
/usr/people/emami/lib/python2.4/site-packages
(Sigh). Copying back to the list.

So, are you running in /usr/people/emami when
you're call ez_setup?

TJG

Feb 26 '07 #7
On 26 Feb, 17:36, Tim Golden <m...@timgolden.me.ukwrote:
>
OK. Keep copying to the list, please. As I said, I'm not
a *nix person (and I'm running here on Windows) so you'll
get a more informed and wider audience from c.l.py.
Just to clarify one thing, $HOME isn't automatically inserted into
sys.path on UNIX, at least in all versions of Python I've used.
However, the directory where an executed Python program resides may be
used in the process of locating modules: it seems to be inserted
automatically into sys.path as the first element, in fact.

So if calendar.py is in the same directory as ez_setup.py, I would
imagine that any attempt to import the calendar module will result in
the this non-standard calendar.py being found and imported, rather
than the standard library's calendar module. The most appropriate
solution is to put ez_setup.py in other location and then to run it.
For example:

mv ez_setup.py /tmp
python /tmp/ez_setup.py

Putting the non-standard calendar.py in a directory separate from
other programs might be an idea, too.

Paul

Feb 26 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: yoda | last post by:
I've recently configured my network such that I use squid as a http proxy. I'd now like to be able to use setuptools and ez_setup via this proxy. Is this possible? If so, how do I do it? The...
0
by: vj | last post by:
I did the following: 1. Downloaded ez_setup.py 2. Downloaded the setuptools-0.6a10-py2.4.egg 3. Downloaded the pysqlite-2.0.6-py2.4-linux-i686(2).egg Transferred all the files to the computer...
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
1
by: Srijit Kumar Bhadra | last post by:
I have browsed the following links 1) http://peak.telecommunity.com/DevCenter/EasyInstall 2) When Python *Eggs* better than Python *distutils*?? What's Eggs? (http://tinyurl.com/m8dyd) But I am...
1
by: alex23 | last post by:
Hey everyone, I'm trying to install setuptools on a work PC behind an NTLM firewall. I've tried to use APS as recommended but am still unable to have anything other than IE talk through...
0
by: TiNo | last post by:
Hi, I'm having problems installing easy_install. When I run python ez_setup.py I get: G:\python>python ez_setup.py 'import site' failed; use -v for traceback Downloading...
1
by: Gerard M | last post by:
Hi guys I have a big problem with this wrapper im using Ubuntu 7.04 and I want to install python-MySQLdb, I used synaptics and it is installed, but when I try to do and I get this error: ...
4
by: Stef Mientki | last post by:
hello, after 4 months playing around with Python, and I still have troubles with egg files. Sometimes it works, sometimes it doesn't. If I google on "python egg", I get lost of links, which...
1
by: neridaj | last post by:
Hello, Does anyone know how to fix this error when trying to build MySQL- python-1.2.2: python setup.py build Traceback (most recent call last): File "setup.py", line 5, in <module> import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.