pipenv
pyenv
mkvirtualenv
virtualenv
pipsi
venv
pew
conda
virtualenvwrapper
i'm sure i'm forgetting like 5.
this is like https://xkcd.com/927/
for the record i use pyenv and virtualenv (although playing with ML i'm using conda)
pipenv
pyenv
mkvirtualenv
virtualenv
pipsi
venv
pew
conda
virtualenvwrapper
i'm sure i'm forgetting like 5.
this is like https://xkcd.com/927/
for the record i use pyenv and virtualenv (although playing with ML i'm using conda)
pyvenv (see comment section, edited) is now deprecated and venv is recommended (shipped as part of Python 3.6 installation) is another confusion. Lest not forget the confusion of distuilts and setuptools is like argparse vs optparse in the past (which are both horrible). The experience of using pip and pypi (now Warehouse) is much better than that of Ruby and of NodeJS, but these "2-in-1" tools are just ridiculously "creative".
As always, pro-tip: consider using the following to ensure environment is loaded properly when you are deploying production
/full_path/env/bin/python myapp.py --workers=3
over source /full_path/env/activate && python myapp.py --workers=3
The latter is fine when you are doing local development in your terminals.If you go on #python IRC channel, every year a group of helpers will collectively recommend one of the above and then perhaps a different one the following year, so please do yourself a favor, just stick to pip and virtualenv.
Probably exciting for VS users.
Using the 1st method, I am certain the shell isn't being modified and loaded with stuff I don't need, and the command and arguments are explicit (when I look at top, or when I do strace).
Generally, you can continue to do #2; I use it when I am doing development, like having multiple terminals up and just source into the environment, then run pytest instead of the full path to pytest. But I highly recommend #1 when you are running your code in production (webapp or not). I am not too familiar with conda so I will defer that to the experts).
Isn't it `pyvenv` that is deprecated? `pyvenv` != `pyenv`
Corrected in my post.
⟩ pyenv --version
zsh: correct 'pyenv' to 'pyvenv' [nyae]?
$ ( . /full_path/env/bin/activate && python myapp.py --workers=3 )
This works for anything that you'd like a temporary shell for: $ pwd
/home/me
$ ( cd /tmp; pwd )
/tmp
$ pwd
/home/meThere's pyenv, pip and virtualenv/venv (same thing) and then there's a bunch of tools to make them more implicit or ergonomic (if you like the way these tools work more than the base).
So really there's not a multitude of competing standards, there's 2/3 complementary standards and then people building their own tools atop that, not entirely unlike the multitudes of Jabber or Twitter clients we used to have.
Things were worse before virtualenv rose to prominence.
E.g. pipenv <- pew, pyenv <- virtualenv/venv, so that list could be likened to complaining that Python, C, assembly, and CPU microcode is "too many". Sure, you could argue they are usable independent of each other, but you aren't about to say that there are too many pieces of tech there and we should stop and sending raw electricity to the CPU.
I think that list could legitimately be cut down to pipenv and conda (maybe pipsi, but that's just for installing CLI tools and isn't for development). Everything else is lower-level than what most people will need for app development.
Buildout is much more than a Python package manager. It runs pluggable recipes, where building/installing a Python package is only one of the many available recipes. It was invented at a company where I once worked. It replaced huge piles of complicated Makefiles.
Buildout is obviously less popular than other solutions, but I think it manages complexity quite well and saves me a lot of time compared with other ways I could assemble Python software.
Virtualenv creates an application directory. Pip install the required packages into it.