4 ms·
We also recently switched from Pipenv to pip-tools and so far it has been very pleasant. Our workflow: - Use pyenv to manage python versions (mostly works pre
by dwaltrip 7y ago
We also recently switched from Pipenv to pip-tools and so far it has been very pleasant.
Our workflow:
- Use pyenv to manage python versions (mostly works pretty well)
- In the beginning, use builtin python 3 tooling to create virtual env for the project: "python3 -m venv venv"
- Whenever needed, add new libs to "requirements.in"
- Run the "pip-compile" command to generate a new "requirements.txt" with the dependency and its sub-dependencies pinned by default to the exact version
- Run "pip install -r requirements.txt" to install the new package and its sub dependencies
- Check both requirements.in and requirements.txt into version control
The big advantage is that requirements.in specifies just the packages you care about, while requirements.txt has your packages and all of the sub dependencies pinned to the exact version.
- wyclif 7y agoI also switched to using pyenv to manage versioning. So far it's been painless. You should never mess with the system Python if you're on a Mac.
- acemarke 7y agoThe `pip-tools` portion of that is basically what I came up with myself and described in another thread at https://news.ycombinator.com/item?id=21779929 https://news.ycombinator.com/item?id=21779929 , except that I'm trying to use `pythonloc` to install things in a local `__pypackages__` folder per PEP-582 instead of using venvs.