Open AWSNB opened 4 years ago
Possible duplicate of #2359. @AWSNB I'm not sure what you are trying to do. You have a CPU that is not supported by the official binaries, but you want to install from them anyway?
cc @seemethere for what could be the best solution here -- I've seen other users facing the same issue. The reason why 0.2.0 works is because there wasn't any compiled parts in torchvision back then
I'm also not exactly sure how you get to this point either, can you provide us with a script to reproduce this?
@pmeier pmeier > Possible duplicate of #2359. @AWSNB I'm not sure what you are trying to do. You have a CPU that is not supported by the official binaries, but you want to install from them anyway?
its not just me, many customers have access to processors that don't have official binaries (Arm-based MAC, AWS Graviton2 processors), and it is fine that binaries dont support all versions, but it should allow building right version from scratch or have none-any for all versions.
@seemethere here's a reproduction on EC2 C6g server, ubuntu 20.04. as you can see, it is install v 0.2.2 because that's latest none-any.whl
ubuntu@ip-172-31-82-41:~$ uname -a Linux ip-172-31-82-41 5.4.0-1021-aws #21-Ubuntu SMP Fri Jul 24 09:43:03 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ip-172-31-82-41:~$ pip install --pre torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Collecting torchvision Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) |ββββββββββββββββββββββββββββββββ| 64 kB 4.4 MB/s .......
/// same thing for stable
ubuntu@ip-172-31-82-41:~$ pip install torchvision -f https://download.pytorch.org/whl/torch_stable.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/torch_stable.html Collecting torchvision Using cached torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB)
@seemethere
Specifying a not (yet) supported python version (from #2359)
pip install --no-deps --target . --python-version=3.9 -f https://download.pytorch.org/whl/torch_stable.html torchvision
Specifying an unsupported platform
pip install --no-deps --target . --platform=macos_arm -f https://download.pytorch.org/whl/torch_stable.html torchvision
@pmeier if the platform (like macos_arm, or aarch64) is not yet defined, python will default to none-any.whl and will install old version
was there a downside for having a none-any wheel for every new version? sounds like the right path for supporting yet to be added platforms
@AWSNB As @fmassa stated before, as of 0.3
torchvision
contains compiled parts. Thus, if you use an unsupported platform you have to compile it yourself. If you don't need anything complicated
pip install git+https://github.com/pytorch/vision@v0.7.0
should already do the trick.
π Bug
the https://download.pytorch.org/whl/torch_stable.html include older version of torchvision with none-any.whl:
torchvision-0.1.6-py2-none-any.whl torchvision-0.1.6-py3-none-any.whl torchvision-0.2.0-py2.py3-none-any.whl
these are old and dont match latest torch versions.
the problem that when perfoming pip3 install torchvision no a cpu that is not supported, the old none-any wheel is installed instead of build from source
To Reproduce:
on EC2 C6g server, ubuntu 20.04. as you can see, it is install v 0.2.2 because that's latest none-any.whl
ubuntu@ip-172-31-82-41:~$ uname -a Linux ip-172-31-82-41 5.4.0-1021-aws #21-Ubuntu SMP Fri Jul 24 09:43:03 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ip-172-31-82-41:~$ pip install --pre torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Collecting torchvision Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) |ββββββββββββββββββββββββββββββββ| 64 kB 4.4 MB/s
Expected behavior
remove all the none-any.whl options, or keep them up to date with latest stable version
Additional context
pip3 install torchvision on AWS Graviton2 is installing old 0.2.0 that's not compatible with latest torch