A full gist with the error is available at https://gist.github.com/ssbarnea/9a70524632c49b452c70aa8c35a79193 and based on my current investigations it seems that this happens when the pypi server asks for basic authentication on package download. The current pypi server is configured to ask for authentication on download and upload but not on listing.
We tried to put credentials in all possible places but without success:
~/.pypirc
- using username and password fields~/.pypirc
- included in the URL of the repository: like https://user:[email protected]~/.netrc
- using standard syntax.I am not sure that I need to mention that password prompts are not accepted by default, as we are doing CI around here.
As a note we discovered that, as a temporary workaround, we were able to create the virtual environment by adding --no-download
to the virtual environment creation. The created virtualenvironment still has the holy-trinity pip
, setuptools
and wheels
even when we use this option.
This bug is related to #3644 and #3643 but is not a duplicate of them.
I had the same error with a private repository with wrong credentials, running with gitlab-ci
. I fixed the credentials and it worked fine, with --extra-index-url=https://user:[email protected]
.
Any invalid index url/credentials will prompt for your credentials and break the build, even if one of them are correct.
A fix for this issue can be a better error message or a flag to avoid prompts.
You need to use pip's configuration files, which are located at https://pip.pypa.io/en/stable/user_guide/#configuration.
You can also avoid prompts with the --no-input
flag.
Most helpful comment
A fix for this issue can be a better error message or a flag to avoid prompts.