News for hackers. Stuff that matters.
Re:Drawbacks of Python by wolf550e on Thursday September 12, 2019 @12:01PM (#20953023)
What is wrong with virtualenv, pip and pip freeze?
Re:Drawbacks of Python by _never_k on Thursday September 12, 2019 @05:20PM (#20956587)
They work, but there's much more friction and many more gotchas than node. The requirements file for example, doesn't distinguish between direct and ancestor dependencies, it has to be explicitly passed to pip, you need to have created and activated your virtual environment correctly, many python libs have fragile, c based builds. Node and nvm just work.
Re:Drawbacks of Python by wolf550e on Thursday September 12, 2019 @07:24PM (#20957564)
I use separate requirements-to-freeze.txt and requirements.txt, so that I maintain only list of direct dependencies (no transitive dependencies) and only pin versions when I know the code won't work with the latest version, but pip freeze creates a file like package lock with all the dependencies versioned so I can recreate the exact environment again without needing to store a docker image of it or something like that. See https://www.kennethreitz.org/essays/a-better-pip-workflow

Needing to name the requirements file and needing to activate venv are not pain points I feel.

Wrapping native libraries and not invoking a C compiler at package install time means some trade-offs. https://cffi.readthedocs.io/en/latest/cdef.html