News for hackers. Stuff that matters.
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.
Re:Python's many command-line utilities by scrlk on Monday June 03, 2024 @07:49PM (#40569108)
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!
Re:Python's many command-line utilities by rubee64 on Monday June 03, 2024 @07:41PM (#40569046)
Completely agree
Re:Python's many command-line utilities by selcuka on Monday June 03, 2024 @08:27PM (#40569374)
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.
Re:Python's many command-line utilities by rbanffy on Saturday June 08, 2024 @07:00AM (#40616765)
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
Re:Python's many command-line utilities by kungp on Tuesday June 04, 2024 @07:37AM (#40573316)
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?
Re:Python's many command-line utilities by otonnesen on Tuesday June 04, 2024 @12:54PM (#40576581)
My 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.