I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it installs in the global python environment.
You probably already know the benefits of apt-get. Automatic update notifications, other apt-installed packages that need those tools know they're installed, etc.
With pip, you know you're getting the latest version at the time you install it, you can install to a non-default version of Python, and you can install to a virtualenv.
If you don't need any of the features pip gives you, and you don't routinely have to install other Python packages which aren't available over APT, use the APT versions.