


Notably, Pipfile was intended to be requirements.txt 2.0, and, how/why Pipenv went down the route that it did with that format is a separate conversation.If you already have Python installed, check if your version is recent enough by running python -version in a console. The whole situation with Pipfile and pipenv is but the want for a better format to specify dependencies to tooling, along with where to pull them from, is something we’ve known about for a while and haven’t made much progress on (in pip) over the last few years. Typically, wanting to use an index server that’s not or things in addition to .Ī thing that’s relevant is that the workflow tools like Pipenv, Poetry and PDM, are currently operating with a different model than pip is. Some relevant context below without my opinions…įundamentally, the want for the ability to specify the index URL comes from the need to carefully control how “abstract” requirements (eg: urllib3) are converted to concrete ones (eg: ). This is already a problem with people confusing the difference between requirements.txt and setup.py/pyproject.toml, I think it will just make the problem worse. I think it confuses people because they’ll make sdists that have that in their pyproject.toml, which pip etc should 100% ignore, but it’s non obvious to people why that is the case. The fact that it’s only supportable when it exists as a file on your machine, at the top level, is why I’m not a fan of having it in pyproject.toml.

You could argue that if you’re say, invoking pip (or another installer) in a directory that has a pyproject.toml file in it, then pip could read the repositories from that specific file for configuring the repositories, but it should never read that information from packages it’s installing. It is configuration for the installer, and the person invoking the installer must have ultimate control over the repositories, not random packages that they’ve downloaded.

That is not package configuration, and shouldn’t be shipped to a repository at all, packages do not define where to get themselves from, hard stop. I’m not really a fan of putting repository information in pyproject.toml.
