Installing and managing packages of Python is a pain. Many popular Python packages are available for installation from Ubuntu repositories, but they can very old. Latest packages can be installed from PyPI using
easy_install, but it makes it difficult to uninstall or upgrade packages.
I have found that the most convenient way to install and manage Python packages is Pip.
An ancient version of Pip is available in Ubuntu repositories as the package
python-pip. This is very old and using it leads to lots of problems down the line. I recommend not using this package.
Pip itself is available as a Python package at PyPI, so it can be installed from there:
$ sudo easy_install pip
- To install a package named
$ sudo pip install foo
- To uninstall a package named
$ sudo pip uninstall foo
- To upgrade an installed package named
$ sudo pip install --upgrade foo
- To list all installed packages and their versions:
$ pip list
- To search PyPI for a package named
$ pip search foo
Tried with: Pip 7.1.0, Python 2.7.6 and Ubuntu 14.04