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

KeyError caffe2/ when installing torch 1.5.1+cpu #636

Closed
1 task done
pawamoy opened this issue Sep 1, 2021 · 2 comments
Closed
1 task done

KeyError caffe2/ when installing torch 1.5.1+cpu #636

pawamoy opened this issue Sep 1, 2021 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@pawamoy
Copy link
Contributor

pawamoy commented Sep 1, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

It's actually quite similar to the last comment of #500.

Steps to reproduce

$ pdm install -v
...
Install torch 1.5.1+cpu failed
Error occurs: 
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/pdm/installers/synchronizers.py", line 190, in install_candidate
    self.manager.install(can)
  File "/usr/local/lib/python3.8/site-packages/pdm/installers/manager.py", line 31, in install
    installer(candidate.build(), self.environment, candidate.direct_url())
  File "/usr/local/lib/python3.8/site-packages/pdm/installers/installers.py", line 74, in install_wheel
    _install_wheel(
  File "/usr/local/lib/python3.8/site-packages/pdm/installers/installers.py", line 173, in _install_wheel
    for record_elements, stream in source.get_contents():
  File "/usr/local/lib/python3.8/site-packages/installer/sources.py", line 165, in get_contents
    record = record_mapping.pop(item.filename)
KeyError: 'caffe2/'

EDIT: ah, you might not be able to reproduce since torch CPU versions are not on pypi.org I think...

Actual behavior

It seems PDM 1.8.1 / installer has troube installing torch 1.5.1+cpu.

Expected behavior

I think versions of PDM before the ones using installer were able to install torch 1.5.1+cpu without issues.

Environment Information

Running in CI, so I don't have the output of the PDM info commands, but it's CPython 3.8.3 on Linux and PDM 1.8.1.

@pawamoy pawamoy added the 🐛 bug Something isn't working label Sep 1, 2021
@pawamoy
Copy link
Contributor Author

pawamoy commented Sep 1, 2021

Ah, I think it's a simple bug in installer: pop(item.filename) -> pop(item.filename, None). Let me close and open again there.

@pawamoy
Copy link
Contributor Author

pawamoy commented Sep 1, 2021

I guess it means the wheel for torch 1.5.1+cpu is broken though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant