Reputation: 13908
I downloaded the ez_setup
code from here: http://peak.telecommunity.com/dist/ez_setup.py
and ran it, but i don't think setuptools
was properly installed. When i try to open an egg using easy_install
i am getting a NameError. Any thoughts?
Here is the specific error:
Traceback (most recent call last):
File "C:...setup.py", line 223, in <module>
easy_install eggsetup.py
NameError: name 'easy_install' is not defined
Upvotes: 49
Views: 220165
Reputation: 7088
2021 update:
easy_install
no longer exists, it was replaced by pip install
.
setuptools
is built-in with Python 3. It's the package to read package files (wheels) and do things under the hood.
pip
is built-in with Python 3.
venv
is built-in with Python 3.
Some operating systems (Debian) like to split packages into smaller independent packages, you may have to sudo apt-get install python3 python3-pip python3-venv
to get all the executables. Nonetheless, the tools are usually available even if the command isn't exposed, try calling python3 -m pip install ...
.
Upvotes: 13
Reputation: 1015
For linux versions(ubuntu/linux mint), you can always type this in the command prompt:
sudo apt-get install python-setuptools
This will automatically install easy_install
.
Upvotes: 99
Reputation: 18978
If you are installing from distro packages, then this probably doesn't apply to your scenario...
I have multiple versions of Python built from source installed, and I found I didn't have setuptools
for version 3.5. It seems like I was missing the zlib
libraries when I compiled 3.5, which subsequently made the setuptools
install fail quietly (to me at least). Recompiling with the zlib
libs installed fixed this for me.
If you are for some reason missing setuptools
and have Python compiled with all the necessary libs, you should be able to install it from the GitHub repo like this:
git clone https://github.com/pypa/setuptools.git
cd ./setuptools
python3.5 bootstrap.py
sudo python3.5 setup.py install
Upvotes: 0
Reputation: 374
apt-get install python-setuptools python-pip
or
apt-get install python3-setuptools python3-pip
you'd also want to install the python packages...
Upvotes: 6
Reputation: 369
please try to install the dependencie with pip, run this command:
sudo pip install -U setuptools
Upvotes: 12
Reputation: 981
For python3 on Ubuntu
sudo apt-get install python3-setuptools
Upvotes: 39
Reputation: 37620
On Ubuntu until python-distribute is something newer than 0.7 I'd recommend:
$ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
See http://reinout.vanrees.org/weblog/2013/07/08/new-setuptools-buildout.html
Upvotes: 2
Reputation: 1102
Give this link a try --> https://pypi.python.org/pypi/setuptools
I'm assuming you're on Windows (could be wrong) but if you click the green Downloads button, it should take you to a table where you can choose to download a .exe version of setuptools appropriate for your version of Python. All that eggsetup stuff should be taken care of in the executable file.
Let me know if you need more help.
Upvotes: 3