5 ms·
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
by cjbprime 13y ago
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!
- TylerE 13y agoWe'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)
- Shish2k 13y agoHaving 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)
- cjbprime 13y ago> 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?
- TylerE 13y agoLibraries 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.
- stdbrouw 13y agoIf 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.)
- ma2rten 13y agoExactly! 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.
- paulgb 13y agoI'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.
- X-Istence 13y agoI 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.
- jamesjporter 13y agoI 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.
- RodericDay 13y agofully 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.
- tbatterii 13y agowhen virtualenv was released with python 3.3 it didnt come with pip.
- Shish2k 13y agoDidn'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.
- jessaustin 13y agoDidn'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.
- Shish2k 13y agoI 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...
- tbatterii 13y agoi think you are confusing virtualenv with pyvenv which is what came with python 3.3 http://www.python.org/dev/peps/pep-0405/ http://www.python.org/dev/peps/pep-0405/
- tomrod 13y agoI have no idea how to get virtualenv working. I'm that user that needs it for now!
- CraigJPerry 13y agoInstall 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.
- tomrod 13y agoCraig, you're my internet hero today. Much thanks!
- zackkitzmiller 13y agovirtualenvwrapper will be a life saver for you.
- lojack 13y agoEither way at some point you need to install pip. They are removing an unnecessary step, which is a good thing.