Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This may be obvious to everyone else, and I'm just over-thinking things, but here goes anyways. It's obviously not completely circular, but the recommended path seems so.

Since this has gotten really long, I'll start with my suggestion. If you start at the virtualenv docs, the first suggestion should be a failsafe way to install virtualenv without pip or anything else that might be missing from the distro ('curl virtualenv_setup | python?). If you start at the pip docs, the first suggestion should be how to install virtualenv normally, not a non-root workaround.


virtualenv

So the goal is to I'll start with whatever ancient version of python is included with my distro, and get the latest versions of pip and virtualenv, ideally with a clear and simple upgrade path for each.

I'll start with virtualenv, from the docs

You can install virtualenv with pip install virtualenv, or the latest development version with pip install virtualenv==dev.

The whole point is that I don't have, so that's out. I'll keep reading...

You can also use easy_install or if you have no Python package manager available at all, you can just grab the single file virtualenv.py and run it with python virtualenv.py.

easy_install happened to be the way I got things working, but lets say my distro wasn't kind enough to provide that. And grabbing virtualenv.py seems like a good temporary solution, but not a long term one.


pip

OK, so how about we try starting with pip? from the docs:

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. For instance:

Hoo boy. Again, simply downloading virtualenv.py is to me a temporary solution, and undesirable on systems I do have root access to.

Prior to installing pip make sure you have either setuptools or distribute installed

OK, so to install a package manager, I first need to install some other installation helper? Is this just for the purposes of installing or are they dependencies that have to stick around? In any case, installing from curl is pretty neat(1).

Download get-pip.py and execute it, using the Python interpreter of your choice:

Neat, another curl-install. This gives me a pip for my distro's version of python, and allows me to get virtualenv for it, which then gives me a separate pip per env. I think? Since I already have things set up, I can't try this method to see what it does.


(1) Out of curiosity, I checked on the recommended way to install distribute. Fortunately, it is basically this curl method. You could use pip, though!

share|improve this question
    
"And grabbing virtualenv.py seems like a good temporary solution, but not a long term one" Why not? If your distro doesn't provide what you want as packages, then you must manage them manually or choose another distro. You just have to decide which of pip, easy_install or virtualenv you want to manage yourself if you want to stick with your dist. –  Paul Apr 25 '12 at 23:58
    
Maybe I'm weird, but I don't like manually copying things to /usr, nor installing to ~/bin unless i have to. I guess it seems to me like a package manager at least should be able take care of itself. Maybe things will get better when major distros finally include pip/virtualenv by default (it's not like on some 10-user distro), because I can't recall having any major problems with CPAN (not that perl doesn't have problems, the 5/6 issue is the same as py's 2/3). Maybe Zed had a point when he said distros have killed python –  Nate Parsons Apr 26 '12 at 5:03
    
But what distribution doesn't have easy_install (which you could kick everything off from)? This is the equivilen of CPAN. –  Paul Apr 26 '12 at 5:45
    
I don't know enough about different distros or when easy_install came out or how much out there is backwards-compatible. CPAN can update itself, but I just tried easy_install easy_install and got nothing. I certainly don't see anyone asking me to replace CPAN. I'm obviously new to the python community/ecosystem, but it seems like there are a few too many hoops for what I thought was a newbie-friendly language. –  Nate Parsons Apr 26 '12 at 15:18
    
If your distribution has easy_install then its updates would be managed by the package manager, not by easy_install itself. I think you are looking for behaviour equivilences in CPAN that are unnecessary. Install easy_install, use that to install virtualenv, use that to install pip. I am voting to close this as there doesn't appear to be an issue to solve. –  Paul Apr 26 '12 at 23:31
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.