3 ms·
I just use pip-tools and vanilla pip. Neither poetry, nor the rightfully maligned pipenv did anything to resolve this. Plain pip is extremely fast and has all t
by aniforprez 4y ago
I just use pip-tools and vanilla pip. Neither poetry, nor the rightfully maligned pipenv did anything to resolve this. Plain pip is extremely fast and has all the features I need and pip-tools' dependency resolver is fast enough that I have had no problems
- jvolkman 4y agopip-tools unfortunately doesn't generate cross-platform lock files, so your locked requirements.txt may be different if you generate it on macos than if you generate it on Linux. Edited to add: both Poetry and PDM do generate cross-platform locks.
- rbanffy 4y ago> may be different if you generate it on macos than if you generate it on Linux. That shouldn't happen. I wonder what could cause it. I never looked them up too closely, but same versions of Python should result in same version of packages regardless of platform.
- DangitBobby 4y agoYou won't run into it most of the time, but if you've got OS specific wheels you can have dependencies that require different requirements files for different OS.
- jvolkman 4y agoJust generate a pip-tools lock file that includes ipython on both macos and Linux and you'll see differences. Only on macos does ipython depend on "appnope".
- kevmo314 4y agoDo you use virtualenv or something to manage different environments? That's the achilles heel of vanilla pip for me, having everything pollute global installs is not so cute.
- deathanatos 4y ago"venv" (the modern version of virtualenv) is included in python3 out of the box¹ now, so creating a virtualenv is as simple as `python3 -m venv venv`. (I usually do use one to avoid polluting the global one / I let the system package manager manage the global install.) ¹but note that Debian & Debian derivatives shove several standard library modules into individual packages, so you might need to apt-get install more than just python3.
- ggregoire 4y agodocker
- kortex 4y agoAbsolutely. You should almost never be pip-installing global things (of course there are circumstances, but you should know exactly why you are choosing to do it, vs an env). Vanilla pip works well with the venv module. I still manually manage the majority of my virtual environments, with the virtualenvwrapper libary, although `source path/to/myvenv/bin/activate` also works. Pipx is great for installing executable tools.
- DangitBobby 4y agopoetry can add some headaches (specifically, occasionally breaks after a version update on the wrong version of python on MacOS), but IMO is worth it for lock files and some of the other features it brings.