Ask Your Question

How to install python easy_install (python distutils) in root or non-root account?

asked 2010-04-20 06:29:10 -0600

Evgeny gravatar image

Many python packages (and some required for Askbot) are distributed via distutils - what if I don't have this tool? How do I install it?

What to do if I don't have administrator privilege?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2010-04-20 06:38:17 -0600

Evgeny gravatar image

updated 2010-04-20 06:52:37 -0600

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 (file with extension .tar.gz). For example (version current at the time of this writing):

  • 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 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
    export PYTHONPATH
    python 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).

edit flag offensive delete link more

answered 2013-07-30 23:05:51 -0600

I recently did a tutorial on how to download and install easy_install using I demonstrate everything using snapshots and you can find it below: (easy_install installation tutorial with images)

I hope you find this helpful and if you have more questions, I will be more than happy to help answer them.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2010-04-20 06:29:10 -0600

Seen: 38,241 times

Last updated: Jul 30 '13