First time here? Check out the FAQ!

Revision history  [back]

first check - maybe you already have easy_install?

Type: which easy_install. If some path is printed - probably you don't need to go through this (but there may be a case when you have a wrong version of easy_install - and then you will need to address this issue. This may happen if you have more than one version of python on the same system.)

Installation from source code

Source code installation will work on all systems and will adapt to your version of Python.

  • Download source distribution of Distutils from http://pypi.python.org/pypi/setuptools (file with extension .tar.gz). For example (version current at the time of this writing):

    wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
    
  • unzip the file, go inside the source directory:

    tar xvfz setuptools-0.6c11.tar.gz
    cd setuptools-0.6c11
    
  • install the package (assuming you are logged in as root)

    python setup.py install
    

If you do not have root privilege some more work will need to be done (only once though)

Which version of python do you have? Let's assume it's 2.4.

    mkdir /path/to/your/python-packages #assuming that directory /path/to/your and is yours
    mkdir /path/to/your/python-packages/lib
    mkdir /path/to/your/python-packages/lib/python2.4/
    mkdir /path/to/your/python-packages/lib/python2.4/site-packages
    PYTHONPATH=/path/to/your/python-packages/lib/python2.4/site-packages
    export PYTHONPATH
    python setup.py install --prefix=/path/to/your/python-packages

That's it. You can now easy_install python modules!

One more thing - you will need to add path to easy_install to your system path variable (will update the post in a bit).

first check - maybe you already have easy_install?

Type: which easy_install. If some path is printed - probably you don't need to go through this (but there may be a case when you have a wrong version of easy_install - and then you will need to address this issue. This may happen if you have more than one version of python on the same system.)

Installation from source code

Source code installation will work on all systems and will adapt to your version of Python.

  • Download source distribution of Distutils from http://pypi.python.org/pypi/setuptools (file with extension .tar.gz). For example (version current at the time of this writing):

    wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
    
  • unzip the file, go inside the source directory:

    tar xvfz setuptools-0.6c11.tar.gz
    cd setuptools-0.6c11
    
  • install the package (assuming you are logged in as root)

    python setup.py install
    

If you do not have root privilege some more work will need to be done (only once though)

Which version of python do you have? Let's assume it's 2.4.

    mkdir /path/to/your/python-packages #assuming that directory /path/to/your and is yours
    mkdir /path/to/your/python-packages/lib
    mkdir /path/to/your/python-packages/lib/python2.4/
    mkdir /path/to/your/python-packages/lib/python2.4/site-packages
    PYTHONPATH=/path/to/your/python-packages/lib/python2.4/site-packages
    export PYTHONPATH
    python setup.py install --prefix=/path/to/your/python-packages

That's it. You can now easy_install python modules!

One more thing - you will need to add path to easy_install to your system path variable (will update the post in a bit).

first check - maybe you already have easy_install?

Type: which easy_install. If some path is printed - probably you don't need to go through this (but there may be a case when you have a wrong version of easy_install - and then you will need to address this issue. This may happen if you have more than one version of python on the same system.)

Installation from source code

Source code installation will work on all systems and will adapt to your version of Python.

  • Download source distribution of Distutils from http://pypi.python.org/pypi/setuptools (file with extension .tar.gz). For example (version current at the time of this writing):

    wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
    
  • unzip the file, go inside the source directory:

    tar xvfz setuptools-0.6c11.tar.gz
    cd setuptools-0.6c11
    
  • install the package (assuming you are logged in as root)

    python setup.py install
    

If you do not have root privilege some more work will need to be done (only once though)

Which version of python do you have? Let's assume it's 2.4.

    mkdir /path/to/your/python-packages #assuming that directory /path/to/your and is yours
    mkdir /path/to/your/python-packages/lib
    mkdir /path/to/your/python-packages/lib/python2.4/
    mkdir /path/to/your/python-packages/lib/python2.4/site-packages
    PYTHONPATH=/path/to/your/python-packages/lib/python2.4/site-packages
    export PYTHONPATH
    python setup.py install --prefix=/path/to/your/python-packages

That's it. You can now easy_install python modules!