Pip: EOFError: EOF when reading a line generated by pip/download.py", line 173

Created on 2 May 2016  路  4Comments  路  Source: pypa/pip

  • Pip version: 8.1.1
  • Python version: 3.5
  • Operating System: darwin

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.

auto-locked

Most helpful comment

A fix for this issue can be a better error message or a flag to avoid prompts.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kkom picture kkom  路  3Comments

cjerdonek picture cjerdonek  路  3Comments

jiapei100 picture jiapei100  路  3Comments

therefromhere picture therefromhere  路  3Comments

dstufft picture dstufft  路  3Comments