Re:Python's many command-line utilities
by fforflo on Monday June 03, 2024 @06:53PM
(#40568602)
My favorite and probably most useful? `python3 -m venv ./venv`
Honestly, forget about conda, poetry, virtualenvwrapper etc and just use that one.
[ Parent
| on HN ]
I like to add `--upgrade-deps` as well. This automatically updates pip and setuptools within the venv after creation.
Re:Python's many command-line utilities
by noitpmeder on Monday June 03, 2024 @09:23PM
(#40569722)
Didn't know about this .. thanks!
Completely agree
Exactly. 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.
Even more if you use the legendary "pip-chill" to trim down the requirements file ;-)
Sorry. Shameless plug.
Re:Python's many command-line utilities
by eternityforest on Tuesday June 04, 2024 @01:47AM
(#40571074)
Poetry tracks your direct vs transient dependencies for you, and poetry run is stateless and easier to work with than a stateful activated venv
Or `uv venv`, `uv pip install` for a free, pretty extreme speedup.
https://github.com/astral-sh/uv/
Re:Python's many command-line utilities
by rrr_oh_man on Tuesday June 04, 2024 @12:43PM
(#40576425)
To save 4 seconds when installing dependencies?