How to manually install a pypi module without pip/easy_install?

  1. Download the package
  2. unzip it if it is zipped
  3. cd into the directory containing setup.py
  4. If there are any installation instructions contained in documentation, read and follow the instructions
    OTHERWISE
  5. type in python setup.py install

You may need administrator privileges for step 5. What you do here depends on your operating system. For example in Ubuntu you would say sudo python setup.py install


EDIT– thanks to kwatford (see first comment)

To bypass the need for administrator privileges during step 5 above you may be able to make use of the --user flag. This way you can install the package only for the current user.

The docs say:

Files will be installed into subdirectories of site.USER_BASE (written as userbase hereafter). This scheme installs pure Python modules and extension modules in the same location (also known as site.USER_SITE).

More details can be found here: http://docs.python.org/2.7/install/index.html

Leave a Comment