Since Setuptools doesn’t support Python3.* so far, for Python3.* we choose Distribute, it is a fork of the Setuptools project.

Distribute is intended to replace Setuptools as the standard method for working with Python module distributions.

Install python Setuptools with easy_install for Python 2.x

1 Download setuptools from http://pypi.python.org/pypi/setuptools/, select the appropriate OS/version you want.

1
sudo sh Downloads/setuptools-0.6c11-py2.7.egg

Output:

1
2
3
4
5
Processing setuptools-0.6c11-py2.7.egg
Copying setuptools-0.6c11-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Install python Distribute with easy_install for Python 3.x

1
2
curl -O http://python-distribute.org/distribute_setup.py
sudo <python-cmd> distribute_setup.py

Output:

1
2
3
Adding distribute 0.6.28 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-3.2 script to /usr/local/bin

Note: Make sure <python-cmd> is a python3.* command, in my PC, Python2.* command is python, while the Python3.* command is python3, use <python-cmd> –version to check out version of <python-cmd>.

Use easy_install 2.x and 3.x

Now per installing 2.x packages, using:

1
easy_install-2.7  <package-name>

while using

1
easy_install-3.2  <package-name>

to install version 3.x packages.

---EOF---