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

pip install forces install of old torch 1.3.0 #338

Closed
vadimkantorov opened this issue Nov 12, 2019 · 20 comments
Closed

pip install forces install of old torch 1.3.0 #338

vadimkantorov opened this issue Nov 12, 2019 · 20 comments
Assignees

Comments

@vadimkantorov
Copy link

vadimkantorov commented Nov 12, 2019

I have torch 1.3.1 installed

pip install torchaudio -f https://download.pytorch.org/whl/torch_stable.html forces collecting of torch 1.3.0 even though a newer version is installed

This is an official installation way from README. If pip is mis-behaving, maybe a conda install should be recommended too

@vincentqb
Copy link
Contributor

Thanks for pointing this out. I can replicate.

@vincentqb vincentqb self-assigned this Nov 18, 2019
@vincentqb
Copy link
Contributor

vincentqb commented Nov 18, 2019

0.3.1 in #308 built on top of nightlies in #306

@vadimkantorov
Copy link
Author

Is it technically possible to make it so that torchaudio has greater-or-equals dependency on torch version? so that this doesn't bite again

@vincentqb
Copy link
Contributor

cc @ezyang

@vincentqb
Copy link
Contributor

vincentqb commented Nov 18, 2019

The requirements.txt does indeed have torch>=1.2.0.

@vadimkantorov
Copy link
Author

There is also maybe a potential problem with libtorch / binary compat if torchaudio is installed from a binary package. In that case exact major version match can be important, but then this should be clearly explained in README (e.g. I had to do pip install git+https://... --no-deps)

@vincentqb
Copy link
Contributor

For reference:

❯ conda install -c pytorch pytorch

❯ pip install torchaudio -f https://download.pytorch.org/whl/torch_stable.html --no-deps
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torchaudio
  Using cached https://files.pythonhosted.org/packages/02/ff/67dc075654832d6411a14b1755fe0a75eeec9d041a4371f857aab2d05357/torchaudio-0.3.1-cp37-cp37m-macosx_10_9_x86_64.whl
Installing collected packages: torchaudio
Successfully installed torchaudio-0.3.1

❯ pip install torchaudio -f https://download.pytorch.org/whl/torch_stable.html          
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Requirement already satisfied: torchaudio in ./anaconda3/envs/audio-pip/lib/python3.7/site-packages (0.3.1)
Collecting torch==1.3.0
  Using cached https://files.pythonhosted.org/packages/0f/27/36b5f7acd661b2a435c7c9283dd4ddeac9a4c7fc0e328efaddeae2ffaf68/torch-1.3.0-cp37-none-macosx_10_9_x86_64.whl
Requirement already satisfied: numpy in ./anaconda3/envs/audio-pip/lib/python3.7/site-packages (from torch==1.3.0->torchaudio) (1.17.3)
Installing collected packages: torch
  Found existing installation: torch 1.3.1
    Uninstalling torch-1.3.1:
      Successfully uninstalled torch-1.3.1
Successfully installed torch-1.3.0

@ezyang
Copy link
Contributor

ezyang commented Nov 19, 2019

@vincentqb did you do a point release of torchaudio when torch 1.3.1 was released? This needs to be done.

@vincentqb
Copy link
Contributor

Indeed, the last point release for torchaudio was 0.3.1 and was done when pytorch 1.3.0 was released, not 1.3.1.

@vincentqb vincentqb mentioned this issue Nov 25, 2019
6 tasks
@momag
Copy link

momag commented Dec 4, 2019

I am still having this issue. Brand new install on a laptop of ubuntu 19; anaconda, pytorch-gpu installed without issue; gpu is nvidia rtx2080 and works without issue. Attempt to

conda install -c pytorch torchaudio
leads me to

The following packages will be DOWNGRADED:

pytorch-gpu 1.3.1-0 --> 1.2.0-0

Where do I install from without downgrading my prior torch installation?

@vadimkantorov
Copy link
Author

A workaround is to install from sources with —no-deps...

@vincentqb
Copy link
Contributor

Closed by #354. Please feel free to re-open if the problem persists.

@vadimkantorov
Copy link
Author

For understanding: if a new version of PyTorch is released and torchaudio isn't released for some time, will a similar issue pop up? (i.e. when PyTorch 1.5.0 is released, will installation of torchaudio downgrade it to 1.4.0?) In other words, does PyTorch Audio require a specific version of PyTorch or just greater-equals?

Asking because that PR is named "0.3.2 point release", so it's not clear if the kind of dependency was adjusted or not

@vadimkantorov
Copy link
Author

0.4.0 release mentions:

Breaking Changes
torchaudio now requires PyTorch 1.3.0 or newer, see https://pytorch.org/ for installation instructions. (#312)

But the PR #312 has nothing to do with change of dependency way / version

@vincentqb
Copy link
Contributor

vincentqb commented Feb 6, 2020

For understanding: if a new version of PyTorch is released and torchaudio isn't released for some time, will a similar issue pop up? (i.e. when PyTorch 1.5.0 is released, will installation of torchaudio downgrade it to 1.4.0?) In other words, does PyTorch Audio require a specific version of PyTorch or just greater-equals?

Asking because that PR is named "0.3.2 point release", so it's not clear if the kind of dependency was adjusted or not

Yes, when a new version of PyTorch is released, point releases of the libraries (torchaudio, torchtext, torchvision) need to be made to point to the new version.

@vincentqb
Copy link
Contributor

0.4.0 release mentions:

Breaking Changes
torchaudio now requires PyTorch 1.3.0 or newer, see https://pytorch.org/ for installation instructions. (#312)

But the PR #312 has nothing to do with change of dependency way / version

#312 is different. There was a change in syntax in pytorch that we needed to propagate to remove warnings. It was merged in a version that would come to depend on the corresponding pytorch version.

@vadimkantorov
Copy link
Author

There was a change in syntax in pytorch that we needed to propagate to remove

Ah, I see! Thanks for clarification!

@vadimkantorov
Copy link
Author

vadimkantorov commented Feb 6, 2020

Yes, when a new version of PyTorch is released, point releases of the libraries (torchaudio, torchtext, torchvision) need to be made to point to the new version.

I may not understand what "point to the new version" means. If a 0.5.0 release of torchaudio comes some time after torch 1.5.0 is released, will a similar issue pop up in the meanwhile?

If yes, this is quite unfortunate, since sattelite projects such as torchvision, torchaudio have much maintainer teams and releases may lag with some time (like it was the case in this issue).
So it means issues like this can pop up from time to time. Should a note about this/workaround be added to README?

Is there a way to specify a dependency in a way that would not cause the downgrade? (at least if a minor version changed only) cc @ezyang

@ezyang
Copy link
Contributor

ezyang commented Feb 10, 2020

If we are doing our job as release maintainers right, torchaudio/torchvision should have releases every time we do a main release of PyTorch.

As for not causing a downgrade, I'm not sure. I feel like you have to explicitly specify the version desired for PyTorch, and then the depsolver will tell you unsat (or pick an older version of the domain library)

@vadimkantorov
Copy link
Author

@ezyang A new version hasn’t always been released unfortunately immediately. I think this situation requires some testing. I read somewhere that pip behavior changed in 9th version - maybe that’s the reason.

At very least this should be clear in README and maybe default installation - downgrade with default installation command is a very nasty user experience

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

No branches or pull requests

4 participants