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

Hard requirement of torch==1.2.0? #1257

Closed
RomainSabathe opened this issue Aug 22, 2019 · 9 comments · Fixed by #1272
Closed

Hard requirement of torch==1.2.0? #1257

RomainSabathe opened this issue Aug 22, 2019 · 9 comments · Fixed by #1272

Comments

@RomainSabathe
Copy link

Hello, I'm revisiting the dependencies for my project and I haven't done that in a long time. I have been using torch 1.1.0 for quite a while; I am confident my code works with it. However it seems like torchvision now requires torch 1.2.0. Here's the output from poetry (pipenv gave a more verbose but essentially same output):


Updating dependencies
Resolving dependencies... (0.1s)
                                                                                                                     
[SolverProblemError]                                                                                  
Because torchvision (0.4.0) depends on torch (1.2.0)                                                               
 and no versions of torchvision match >0.4.0,<0.5.0, torchvision (>=0.4.0,<0.5.0) requires torch (1.2.0).          
So, because my_project depends on both torch (=1.1.0) and torchvision (^0.4.0), version solving failed.  

Is this intended or is this a 'bug'? Am I missing something? Thanks.

@soumith
Copy link
Member

soumith commented Aug 23, 2019

this is not intended to be a bug. you can use torchvision 0.3.0 to use with pytorch 1.1.0

@Multihuntr
Copy link

The Pypi description for 0.4.0 still says:

TorchVision requires PyTorch 1.1 or newer.

But if you have PyTorch 1.1 installed, then installing pip install torchvision==0.4.0 with miniconda will remove PyTorch 1.1 and install PyTorch 1.2

@soumith
Copy link
Member

soumith commented Aug 23, 2019

whoops, the pypi description needs to be fixed.

@sbelharbi
Copy link

hi,
i am installing pytorch 1.3.0 using pip install torch torchvision
i am getting ERROR: torchvision 0.4.0 has requirement torch==1.2.0, but you'll have torch 1.3.0 which is incompatible.

but,

it succeeds to install!
Successfully installed torch-1.3.0 torchvision-0.4.0

$pip freeze
...
torch==1.3.0
torchvision==0.4.0
...

in the release note it says Note: torchvision 0.4 requires PyTorch 1.2 or newer

pypi says TorchVision requires PyTorch 1.1 or newer.

the doc issue mentioned above may be still going on.
thanks

@fmassa
Copy link
Member

fmassa commented Oct 28, 2019

@soumith do you know how we update the pypi readme?

@sbelharbi if you install PyTorch 1.3.0, you need torchvision 0.4.1, or else you'll face import errors.
torchvision 0.4.0 works with PyTorch 1.2.0

@sbelharbi
Copy link

for now, quick import didn't raise an issue.
i'll try it out this week and see.
in case of issues, i'll downgrade to torch.1.2.0 and wait for torchvision.0.4.1.
thanks

In [1]: import torch

In [2]: import torchvision

In [3]: torch.__version__
Out[3]: '1.3.0'

In [4]: import torchvision.transforms.functional as TF
$ pip freeze | grep -w "torchvision"
torchvision==0.4.0

@sbelharbi
Copy link

first try leads to cuda incompatibility (requires cuda 10.1, i have 10.0). my fault.
i get torch.1.3.0 and torchvision.0.4.1 from wheels.
thanks for the heads up.

torch==1.3.0+cu100
torchvision==0.4.1+cu100

@soumith
Copy link
Member

soumith commented Oct 29, 2019

@fmassa you upload a source distribution python setup.py sdist and then twine upload the created file, then it will use the description etc. from setup.py to populate the README. If I remember correctly.

@Multihuntr
Copy link

It uses the long_description field from the setup.py, which uses your README.rst: https://github.com/pytorch/vision/blob/master/setup.py#L203

But I can see that that should have been updated as of v0.4.1? But it still says "TorchVision requires PyTorch 1.1 or newer." on pypi for v0.4.1.post2? Something weird is going on.

Btw; I looked this up when I came across this before (I was curious), and there's a giant thread of people complaining that you can't upload a new description without uploading the whole thing again: pypi/warehouse#2170

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

Successfully merging a pull request may close this issue.

5 participants