Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


poetry 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.


pip-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.


> 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.


Just 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".


You 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.


Do 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.


"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.


Absolutely. 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.


docker




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: