How to Get Setuptools and Easy_Install?
I Downloaded the Ez_Setup Code from Here: and Ran It, but I Don't Think Setuptools Was Properly Installed. When I Try to Open an Egg Using Easy_Install I Am...
I downloaded the ez_setup code from here:
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
9 Answers
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.
For python3 on Ubuntu
sudo apt-get install python3-setuptools
please try to install the dependencie with pip, run this command:
sudo pip install -U setuptools
apt-get install python-setuptools python-pip
or
apt-get install python3-setuptools python3-pip
you'd also want to install the python packages...
Give this link a try -->
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.
2021 update:
easy_installno longer exists, it was replaced bypip install.setuptoolsis built-in with Python 3. It's the package to read package files (wheels) and do things under the hood.pipis built-in with Python 3.venvis 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 ....
On Ubuntu until python-distribute is something newer than 0.7 I'd recommend:
$ wget -O - | sudo python
See
For Amazon Linux AMI
yum install -y python-setuptools
If you are installing from distro packages, then this probably doesn't apply to your scenario...
recompile python
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.
install from GitHub
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
cd ./setuptools
python3.5 bootstrap.py
sudo python3.5 setup.py install