4 ms·
My favorite and probably most useful? `python3 -m venv ./venv` Honestly, forget about conda, poetry, virtualenvwrapper etc and just use that one.
by fforflo 2y ago
My favorite and probably most useful? `python3 -m venv ./venv`
Honestly, forget about conda, poetry, virtualenvwrapper etc and just use that one.
- scrlk 2y agoI like to add `--upgrade-deps` as well. This automatically updates pip and setuptools within the venv after creation.
- noitpmeder 2y agoDidn't know about this .. thanks!
- rubee64 2y agoCompletely agree
- selcuka 2y agoExactly. People complain about Python's package management story, but for 99% of use cases a workflow that consists of Python's built-in venv, pip, requirements.txt, and constraints.txt is completely fine.
- rbanffy 2y agoEven more if you use the legendary "pip-chill" to trim down the requirements file ;-) Sorry. Shameless plug.
- eternityforest 2y agoPoetry tracks your direct vs transient dependencies for you, and poetry run is stateless and easier to work with than a stateful activated venv
- kungp 2y agoOr `uv venv`, `uv pip install` for a free, pretty extreme speedup. https://github.com/astral-sh/uv/ https://github.com/astral-sh/uv/
- rrr_oh_man 2y agoTo save 4 seconds when installing dependencies?
- otonnesen 2y agoMy work saw a 5x speedup (~2min to ~20s) with a cold cache and like 200-500x (~20s to <0.1s) with a hot cache in our CI pipelines when we switched to uv.