Downloading and installing

Prerequisites

Installing using pip

The simplest and recommended method of installation is using pip.

To download and install, type [1] on a console window:

pip install https://sites.google.com/site/libutilitaspy/downloads/libutilitaspy-|version|.tar.gz

Note

If you don’t have pip, then follow the instructions from this link: http://www.pip-installer.org/en/latest/installing.html

Installing using only distutils

Type [1] [2] on a console window:

cd /path/to/your/downloads/folder
wget https://sites.google.com/site/libutilitaspy/downloads/libutilitaspy-0.1dev.tar.gz
tar zxf libutilitaspy-0.1dev.tar.gz
cd libutilitaspy-0.1dev
python setup.py install

Note

It is preferable to install using pip, as it makes it easier to uninstall packages.

Uninstalling using pip

Type [1] on a console window:

pip uninstall libutilitaspy

Uninstalling using only distutils

  1. Find out the Python prefix directory. You can do that by typing on the command line:

    $ python -c "import sys; print sys.prefix"

    For a standard central Python distribution, this is typically /usr or /usr/local on Linux [3] or C:\Python26 on Windows, but it could be something else, for example if you are using virtualenv.

  2. Find out the location of the Python site-packages directory. On Linux this is <prefix>/lib/python<version>/site-packages [4] and <prefix>\lib\site-packages on Windows.

    So for example, common locations are /usr/lib/python2.6/site-packages and /usr/local/lib/python2.6/dist-packages.

  3. Go to the site-packages folder and remove the package and egg info, e.g.:

    $ cd /usr/lib/python2.6/site-packages
    $ rm -rf libutilitaspy*
  4. On Linux, go to the <prefix>/share directory and remove the package folder. For example:

    $ cd /usr/share
    $ rm -rf libutilitaspy*

Footnotes

[1](1, 2, 3) You may need to type sudo in front of the pip install ... command (or python setup.py install)
[2]The wget command is a command on Unix-like systems (Linux, MacOSX) which downloads the distribution archive, and may not be available on all platforms. Alternatively you can just download and extract the archive in a folder of your choice. An alternative to wget is the curl command.
[3]Some distributions have Python on both /usr and /usr/local so you might have to check both.
[4]On Debian-based distributions such as Ubuntu, site-packages is usually called dist-packages.