Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot detect archive format? #5

Closed
mathpunk opened this issue Dec 3, 2019 · 5 comments
Closed

Cannot detect archive format? #5

mathpunk opened this issue Dec 3, 2019 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@mathpunk
Copy link

mathpunk commented Dec 3, 2019

This may be a matter of me not being a very pythonic guy: Do you know what I should try if your installation instructions give me this result? (The --user is an attempt to avoid sudo-ing but I could also mess with some permissions.)

> pip install --index-url --user https://test.pypi.org/simple/ reretrieve 
Looking in indexes: --user
Collecting https://test.pypi.org/simple/
  Downloading https://test.pypi.org/simple/ (2.9MB)
     |████████████████████████████████| 2.9MB 445kB/s 
  ERROR: Cannot unpack file /tmp/pip-unpack-75hejztt/simple (downloaded from /tmp/pip-req-build-xex4v69_, content-type: text/html; charset=UTF-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-xex4v69_
@SalomonSmeke
Copy link
Owner

Hey @mathpunk could you give me some information about your system? OS and the like? I have only tested on MacOS thus far so it may be a problem for other OSs, would be valuable info.

python -V also would be nice.

@SalomonSmeke SalomonSmeke self-assigned this Dec 3, 2019
@mathpunk
Copy link
Author

mathpunk commented Dec 3, 2019

Arch Linux, Python 3.7.4

@SalomonSmeke
Copy link
Owner

SalomonSmeke commented Dec 4, 2019

Thank you @mathpunk! Im pulling an arch docker image to try and reproduce.

Edit: Irrelevant My initial suspicion was that your pip was aliased to a python2 legacy install but the error I get when I try that does not match this error at all.

Searching for similar issues online indicates to me the possibility that there is a problem because the package name reretrieve does not match the project name rere.

pypa/pip#5271

This issue is quite old and solved in newer versions of pip as far as I can tell.

Im going to continue pursuing the Arch docker image just to make double sure, but in the meanwhile:

Could you send me your pip version? pip -V?

@SalomonSmeke
Copy link
Owner

SalomonSmeke commented Dec 4, 2019

Nvm no need! The arch image reproduced first try.

Details of how I figured it out
[root@faeafbdb3216 /]# pip install --index-url --user https://test.pypi.org/simple/ reretrieve
Looking in indexes: --user
Collecting https://test.pypi.org/simple/
  Downloading https://test.pypi.org/simple/ (2.9MB)
     |████████████████████████████████| 2.9MB 5.4MB/s 
  ERROR: Cannot unpack file /tmp/pip-unpack-pxa_35ro/simple (downloaded from /tmp/pip-req-build-zquew_l_, content-type: text/html; charset=UTF-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-zquew_l_
WARNING: Url '--user/pip/' is ignored. It is either a non-existing path or lacks a specific scheme.

Removing --user fixed the problem immediately, however:

[root@faeafbdb3216 /]# pip install --index-url https://test.pypi.org/simple/ reretrieve
Looking in indexes: https://test.pypi.org/simple/
Collecting reretrieve
  Downloading https://test-files.pythonhosted.org/packages/77/1a/3c84db3310c151a5522fa743277ec2052db931dc7b82b38ebd2a4eeb460e/reretrieve-0.0.0.dev4-py3-none-any.whl
Requirement already satisfied: urllib3 in /usr/lib/python3.8/site-packages (from reretrieve) (1.25.7)
Collecting mypy (from reretrieve)
  Downloading https://test-files.pythonhosted.org/packages/ae/9a/4759af69a975ce75c7a6b2312ec63e9b1fd8d0f92753bf835b5d152b60ba/MyPy-0.0.1-py3-none-any.whl
Requirement already satisfied: requests in /usr/lib/python3.8/site-packages (from mypy->reretrieve) (2.22.0)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.8/site-packages (from requests->mypy->reretrieve) (3.0.4)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.8/site-packages (from requests->mypy->reretrieve) (2.8)
Installing collected packages: mypy, reretrieve
Successfully installed mypy-0.0.1 reretrieve-0.0.0.dev4

so I tried installing a different package with the --user param and the custom test pypi index url:

[root@faeafbdb3216 /]# pip install --index-url --user https://test.pypi.org/simple/ ijson
Looking in indexes: --user
Collecting https://test.pypi.org/simple/
  Using cached https://test.pypi.org/simple/
  ERROR: Cannot unpack file /tmp/pip-unpack-v8ubdddw/simple (downloaded from /tmp/pip-req-build-xae5i9kt, content-type: text/html; charset=UTF-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-xae5i9kt

It appears the order of the parameters is the issue here. --user is being used as the --index-url instead of the actual url.

The following works for me on an arch setup similar to yours:
pip install --user --index-url https://test.pypi.org/simple/ reretrieve

could you try this out and let me know how it goes?

@SalomonSmeke
Copy link
Owner

Stale closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants