Re:Explicit bootstrapping of pip in Python installations
by cjbprime on Tuesday October 22, 2013 @10:05AM
(#6591935)
This isn't very big news, in that virtualenv already provides pip in each new env, and you should not be using pip outside virtualenv -- unless it's to install virtualenv!
[ Parent
| on HN ]
Re:Explicit bootstrapping of pip in Python installations
by TylerE on Tuesday October 22, 2013 @10:10AM
(#6591971)
We're not all building web apps in python - virtualenv is not universally useful.
(Edit: Not that I don't like virtualenv when it's appropriate, but it really bugs me the wrong way when people just throw out generalizations like that)
Re:Explicit bootstrapping of pip in Python installations
by paulgb on Tuesday October 22, 2013 @10:55AM
(#6592288)
I'm not a web developer, but I do data analysis with Python, and I use virtualenv heavily. For one thing, it increases reproducibility to have a record (pip freeze) of which versions of each package I used.
Re:Explicit bootstrapping of pip in Python installations
by Shish2k on Tuesday October 22, 2013 @10:20AM
(#6592052)
Having tried various ways of distributing desktop apps / non-web daemons, I've found virtualenvs useful there too (with the one fairly large caveat that installing wxWidgets in a virtualenv is a world of pain :( But then in those cases I use the OS-provided packages with the OS package manager, so I still never use virtualenv and pip independently)
Re:Explicit bootstrapping of pip in Python installations
by ma2rten on Tuesday October 22, 2013 @10:51AM
(#6592258)
Exactly! I am currently working on a machine learning task. Python is great for this, but most of the scripts that I am writing are run-once scripts. VirtualEnv would be overkill of this usecase.
Re:Explicit bootstrapping of pip in Python installations
by cjbprime on Tuesday October 22, 2013 @10:26AM
(#6592090)
> We're not all building web apps in python - virtualenv is not universally useful.
Huh, fair enough. I work on non-webapps too -- could you explain more about your use case?
Re:Explicit bootstrapping of pip in Python installations
by stdbrouw on Tuesday October 22, 2013 @11:01AM
(#6592332)
If you're doing data analysis, where most libraries are serious about backwards compatibility and you don't necessarily care whether your code still runs two years from now... virtualenvs are sometimes just not worth the bother. (Though I'd still recommend them.)
Re:Explicit bootstrapping of pip in Python installations
by TylerE on Tuesday October 22, 2013 @10:54AM
(#6592281)
Libraries that are very build-finicky (like various image processing libs) I've had bad luck with virtualenv, or env pip. Usually end up building by hand.
Re:Explicit bootstrapping of pip in Python installations
by X-Istence on Tuesday October 22, 2013 @11:43AM
(#6592636)
I build web apps, but almost anything else I do, including a full Python based backend for $WORK is all done in a virtualenv. Virtualenv's are not just for web apps.
Re:Explicit bootstrapping of pip in Python installations
by RodericDay on Tuesday October 22, 2013 @01:46PM
(#6593565)
fully agreed. the numpy, scipy, matplotlib, PyQt4 stack in particular is very indifferent to virtualenvs: you're going to need to install a whole ton of dependencies system-wide regardless.
i recommend it to everyone i work with, but it is significantly more useful when all your dependencies are pure python.
Re:Explicit bootstrapping of pip in Python installations
by jamesjporter on Tuesday October 22, 2013 @01:37PM
(#6593473)
I agree with paulgb and others -- most of my past work with python could be called scientific programming in one way or another and pip has been enormously useful.
Re:Explicit bootstrapping of pip in Python installations
by lojack on Tuesday October 22, 2013 @10:26AM
(#6592092)
Either way at some point you need to install pip. They are removing an unnecessary step, which is a good thing.
Re:Explicit bootstrapping of pip in Python installations
by tomrod on Tuesday October 22, 2013 @10:19AM
(#6592048)
I have no idea how to get virtualenv working. I'm that user that needs it for now!
Re:Explicit bootstrapping of pip in Python installations
by CraigJPerry on Tuesday October 22, 2013 @10:31AM
(#6592129)
Install virtualenv:
pip install virtualenv
mkdir ~/.virtualenvs
virtualenv ~/.virtualenvs/my_new_project
Activate it to continue development: . ~/.virtualenvs/my_new_project/bin/activate
The effect of this is that `python` and `pip` commands now only act on the virtualenv and not system (or user) site wide.Deactivate it:
deactivate
Python and pip commands are now the system versions again.
Re:Explicit bootstrapping of pip in Python installations
by tomrod on Tuesday October 22, 2013 @04:23PM
(#6594685)
Craig, you're my internet hero today. Much thanks!
Re:Explicit bootstrapping of pip in Python installations
by zackkitzmiller on Tuesday October 22, 2013 @11:28AM
(#6592518)
virtualenvwrapper will be a life saver for you.
Re:Explicit bootstrapping of pip in Python installations
by tbatterii on Tuesday October 22, 2013 @10:19AM
(#6592046)
when virtualenv was released with python 3.3 it didnt come with pip.
Re:Explicit bootstrapping of pip in Python installations
by Shish2k on Tuesday October 22, 2013 @10:28AM
(#6592117)
Didn't come with it, or didn't install it by default?
AFAIK the default virtualenv behaviour has been "create an environment and then automatically and immediately install pip from the internet", so for the last several years they've been practically tied together, even if they were distributed individually.
Re:Explicit bootstrapping of pip in Python installations
by jessaustin on Tuesday October 22, 2013 @10:46AM
(#6592212)
Didn't come with it, or didn't install it by default?
In that the following commands have also been required after running pyvenv-3.3, no, python has not "come with" pip:
(venv) $ wget http://python-distribute.org/distribute_setup.py
(venv) $ python distribute_setup.py
(venv) $ easy_install pip
I believe it has been possible to configure pyvenv to do this automatically, but I've never done that.
Re:Explicit bootstrapping of pip in Python installations
by Shish2k on Wednesday October 23, 2013 @04:17AM
(#6597548)
I was talking about virtualenv, not pyvenv - grandparent saying "virtualenv was released with python 3.3" made it sound like virtualenv was released with python 3.3...
Re:Explicit bootstrapping of pip in Python installations
by tbatterii on Tuesday October 22, 2013 @11:23AM
(#6592489)
i think you are confusing virtualenv with pyvenv which is what came with python 3.3 http://www.python.org/dev/peps/pep-0405/