(1) specifically state that `pip freeze` is how to create requirements file (as folks have said in comments already) (2) add "further reading" link on VirtualEnvWrapper, as it adds some convenience methods to ease use of VirtualEnv (3) the "yolk" package shows you what's currently installed; it can be helpful to `pip install yolk` then run `yolk -l` to view the different packages installed in each of your envs. (4) when installing a package, you can specify the version, e.g. `pip install mod==1.1`, whereas `pip install mod` will simply install the latest
A non-magical introduction to pip and virtualenv for Python beginners
21–30 of 86 posts
Re: A non-magical introduction to pip and virtualenv for Python beginners
#22Want to make life even easier? Check out virtualenvwrapper. http://virtualenvwrapper.readthedocs.org/en/latest/ Lots of benefits, but trading 'cd path/to/my/project && source env/bin/activate' for 'workon project_env' (with autocomplete) is alone easily worth the five seconds it takes to check it out.
Re: A non-magical introduction to pip and virtualenv for Python beginners
#23Do I package virtualenvs in an RPM or DEB?
Re: A non-magical introduction to pip and virtualenv for Python beginners
#24Re: A non-magical introduction to pip and virtualenv for Python beginners
#25> Python actually has another, more primitive, package manager called easy_install, which is installed automatically when you install Python itself. It's actually not, it's part of setuptools/distribute, though some Python distributions (actually just brew that I know of) include distribute alongside Python. Also, while the quick skim of the rest of this looks mostly good, there's some unnecessary advice which compli…
Is this relevant advice for packages needed by your web server account, e.g. www-data?
Re: A non-magical introduction to pip and virtualenv for Python beginners
#26Can someone explain the historical reasons for this problem even existing in the first place? (the problem that virtual env solves)
Re: A non-magical introduction to pip and virtualenv for Python beginners
#27Want to make life even easier? Check out virtualenvwrapper. http://virtualenvwrapper.readthedocs.org/en/latest/ Lots of benefits, but trading 'cd path/to/my/project && source env/bin/activate' for 'workon project_env' (with autocomplete) is alone easily worth the five seconds it takes to check it out.
Re: A non-magical introduction to pip and virtualenv for Python beginners
#28VertualEnv seems less like a brilliant tool than it does a workaround for an architectural problem in Python and pip. That said, dependency hell is always tricky, and I've had to deal with some far uglier solutions in other platforms.
dealing with dependencies is always step 2 for me when learning a new language and dependency hell seems like a universal problem. I could be wrong though.
Re: A non-magical introduction to pip and virtualenv for Python beginners
#29Some of the mentioned problems with the traditional method are partially solved with `pip install requests --user` but I understand that the bigger problem/main reason for virtualenv isn't helped by this. However, I was very surprised that the author didn't mention venv ( http://docs.python.org/3.3/library/venv.html ) at all since it is basically virtualenv but part of the Python standard library.