How to Use Setuptools, Alternatives?

dough doug.hellinger at hotmail.com
Mon May 30 14:48:55 EDT 2011


On May 29, 10:41 pm, ray <r... at aarden.us> wrote:
> I have Python 2.7 on Win7 Pro on a tightly locked down desktop.  I
> would like to install Networkx from an egg.  From what I have read,
> Setuptools can be used for this.
>
> I don't know how to install Setuptools.  The exe will not work.  On
> execution, it reports that the Python version is not included in the
> registry.  Further, I can not input the version and location on the
> subsequent installation screen, the fields will not accept focus so I
> can not input the values.
>
> Since the exe will not install, I considered using the Setuptools
> egg.  But it requires Setuptools.  It appears to be a circle.
>

You're right. Since Setuptools is distributed as an egg, and Python
doesn't natively support eggs,
there can be a "chicken-and-egg" situation.

> What are some suggestions for installing this?
>
> Thanks,
> ray

You can try downloading ezsetup.py and running it as a python script
(i.e. python ezsetup.py).
It will locate and download the latest version of Setuptools for your
platform and install it.
If HTTP access is blocked, just place the desired egg in the same
folder as ezsetup.py and run
the script again.

Assuming you can get Setuptools installed correctly, it puts a program
called easy_install.exe
in your <python>\Scripts folder. You can then just run (from the
command line):

easy_install <package name>

It will hunt, download and install the latest version of the package
for your platform.
You may want to add the path to the Scripts folder to your PATH
environment variable so
you can just run easy_install from any current working directory.

Hope that helps,

Doug



More information about the Python-list mailing list