Installing python module from source

  1. Download the module. It usually comes as a tar.gz or zip file (for example, markdown).
  2. Uncompress the file (using The Unarchiver, winzip, the Linux command tar -zxvf archive_name.tar.gz, ...).
  3. cd to the newly extracted directory. In this directory, there should be a file called setup.py
  4. Type $ python setup.py install.
  5. If you do not have admin rights, you might need to specify a folder where the module will be installed $ python setup.py install --home=path/to/new/INSTALL_DIRECTORY/. In addition, the specified INSTALL_DIRECTORY must be added to the python path. In cshell, this can be done for example by adding a line in the .cshrc file (setenv PYTHONPATH path/to/new/INSTALL_DIRECTORY:${PYTHONPATH}
  6. )

Comments

Popular Posts