3 ms·
To install a package and its dependencies, you need the list of dependencies. This metadata is not always statically available! Python packages are often just
by db48x 1y ago
To install a package and its dependencies, you need the list of dependencies. This metadata is not always statically available!
Python packages are often just a zip file full of py files, with one of them called 'setup.py'. Running this file installs the package (originally using [distutils](https://docs.python.org/3.9/install/index.html#install-index https://docs.python.org/3.9/install/index.html#install-index)). This installation may fail if dependencies are not present, but there’s no method provided for installing those dependencies. You’re supposed to read the error message, go download the source for the missing dependencies, then run their setup.py scripts to install them.
- badmintonbaseba 1y agoHow does uv get around this?
- bckr 1y agoDon’t think it does. You see the import errors when you run your code and you add the requirements to your project.
- nonethewiser 1y agobecause instead of running setup.py it directly fetches the specified dependencies
- db48x 1y agoI don’t know; I’ve only just heard of uv. I know about the packaging problem because I’ve had to deal with that nonsense a few times.