I don't want to deal with virtualenv for a local Python installation, I just want to install a few packages locally without dealing with the
PYTHONPATH environment variable, how do I do that?
Python (as of 2.6 and 3.0) now searches in the ~/.local directory for local installs, which do not require administrative privileges to install, so you just need to point your installer to that directory.
If you have already downloaded the package
foo and would like to install it manually, type:
cd path/to/foo python setup.py install --user
If you are using easy_install and would like the package downloaded and installed:
easy_install --prefix=$HOME/.local/ foo
Update by RafiK
pip install --user foo
The following answer is provided for historical purposes: It's a little more work if you are using pip to download and install:
pip install --install-option="--prefix=$HOME/.local" foo
Even though I like Python as a language, distributing Python packages is a mess. I always find people not familiar with Python struggling with it.
Next to the user-local install as outlined by Aron (using --user, or --prefix), another option is EasyBuild (http://hpcugent.github.com/easybuild/). Not only for Python packages, but for any (scientific) software package. Once EasyBuild has support for it, building and installing a software package is basically a single command.
For a list of software packages currently supported, see https://github.com/hpcugent/easybuild/wiki/List-of-supported-software-packages.
Disclaimer: I am a developer of EasyBuild.