-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pytorch and torchvision CPU version install fails #4504
Comments
|
So, i think that problem is near pipenv/pipenv/patched/piptools/utils.py Line 232 in 912164d
when it checks package requirements, and there are specified both versions 1.6.0 and 1.6.0+cpu - it fails, bacause accepts only one. btw, PIP correctly installs both packages
|
The >>> from packaging import version, specifiers
>>> version.parse('1.6.0+cpu') in specifiers.SpecifierSet('==1.6.0')
True But indeed this is a pip-tools issue and should be reported upstream. |
It seems like they are already aware of the issue, but do not have a fix yet. jazzband/pip-tools#1114 |
Does anyone have a workaround for this?
Using this works for torchvision, but torch still failling. |
If you stumble upon this thread by googling "TypeError: Expected pinned or editable requirement, got torch" do try @fgriberi's solution, it worked fine for me although setting me back a pytorch version. |
As @MoRoBe-Work pointed out, if I "pipenv install" by Pipfile as below,
no error happens but print(torch.__version__) shows torch+cu102. Would anyone know how to install torch+cu111 by pipenv ? Whole Pipfile[[source]] [[source]] [packages] [dev-packages] [requires] |
I use the line Does this work for you as well? |
It works😀 Thank you so much! |
Hello,
I wanted to install CPU version of torch 1.6.0 and torchvision 0.7.0
it's similar issue like #4422 and #4171
but in my case, pipenv unable to solve requirements even they are written in pipenv file
Issue description
Requirements check fails with expectation of pinned package version
Expected result
Torch and torchvision are installed
Actual result
Steps to replicate
command
pipenv lock -v
Pipfile contents
Pipenv version:
'2020.8.13'
Python version
3.6.10
I have tried also with latest python 3.8 version - but it does not change anything.
Specifying version field in package settings also does not help
The text was updated successfully, but these errors were encountered: