I've already been using pip and virtualenv (and actually sometimes still prefer a well organized combination through an SVN repository, wise usage of svn:externals, and dynamic sys.path).
But this time for a new server installation I'd like to do things in the right way.
So I go to the pip installation page and it says:
The recommended way to use pip is within virtualenv, since every virtualenv has pip installed in it automatically. This does not require root access or modify your system Python installation. [...]
Then I go to the virtualenv installation page and it suggests:
You can install virtualenv with pip install virtualenv, or the latest development version with pip install virtualenv==dev. You can also use easy_install [...]
And pip is supposed to replace easy_install, of course :)
Granted, they both explain all alternative ways to install.
But... which one should go first? And should I favor systemwide pip or not?
I see a main reason to ponder over, but there might be others
- do I want to facilitate life for all users of the box, or is this a server targeted to one single user running some services?
If I want everybody to have a virtual env available I might just install a system wide pip (eg. with ubuntu do sudo aptitude install python-pip
then use it to install virtualenv sudo pip install virtualenv
).
edit another reason to ponder over: virtualenvwrapper install instructions (but not the docs) say:
Note In order to use virtualenvwrapper you must install virtualenv separately.
not exactly sure what "separately" mean there (i never noticed).
Otherwise, which one should go first, and does it really make a difference or not?
Related:
The closest question (and answers) is the first of the following (in particular see @elarson answer), the second looks overly complicated:
- What is the official "preferred" way to install pip and virtualenv systemwide?
- What's the proper way to install pip, virtualenv, and distribute for Python?
- Step by step setting up python with pip and virtualenv?
- System PIP instead of virtualenv PIP by default?
but I feel it all fail at answering my question in full: systemwide vs. local, but also should pip or virtualenv go first (and why do they send each one to the other to start with!!!)