报错如下
( tf2. 0) [root@idalei FdWebsite]
Looking in indexes: https:/ / pypi. tuna. tsinghua. edu. cn/ simple
ERROR: Could not find a version that satisfies the requirement torch==1. 5. 1+ cpu ( from versions: 0. 1. 2, 0. 1. 2. post1, 0. 1. 2. post2, 0. 3. 1, 0. 4. 0, 0. 4. 1, 1. 0. 0, 1. 0. 1, 1. 0. 1. post2, 1. 1. 0, 1. 2. 0, 1. 3. 0, 1. 3. 1, 1. 4. 0, 1. 5. 0, 1. 5. 1, 1. 6. 0, 1. 7. 0, 1. 7. 1, 1. 8. 0, 1. 8. 1)
ERROR: No matching distribution found for torch==1. 5. 1+ cpu
输入命令
pip install torch==1. 5. 1+ cpu torchvision==0. 6. 1+ cpu - f https:/ / download. pytorch. org/ whl/ torch_stable. html
问题解决
( tf2. 0) [root@idalei FdWebsite]
Looking in indexes: https:/ / pypi. tuna. tsinghua. edu. cn/ simple
Looking in links: https:/ / download. pytorch. org/ whl/ torch_stable. html
Collecting torch==1. 5. 1+ cpu
Downloading https:/ / download. pytorch. org/ whl/ cpu/ torch- 1. 5. 1% 2Bcpu- cp36- cp36m- linux_x86_64. whl ( 127. 3 MB)
| ████████████████████████████████| 127. 3 MB 38 kB/ s
Collecting torchvision==0. 6. 1+ cpu
Downloading https:/ / download. pytorch. org/ whl/ cpu/ torchvision- 0. 6. 1% 2Bcpu- cp36- cp36m- linux_x86_64. whl ( 5. 7 MB)
| ████████████████████████████████| 5. 7 MB 396 kB/ s
Requirement already satisfied: numpy in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( from torch==1. 5. 1+ cpu) ( 1. 18. 5)
Collecting future
Downloading https:/ / pypi. tuna. tsinghua. edu. cn/ packages/ 45/ 0b/ 38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/ future- 0. 18. 2. tar. gz ( 829 kB)
| ████████████████████████████████| 829 kB 15. 9 MB/ s
Requirement already satisfied: pillow>=4. 1. 1 in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( from torchvision==0. 6. 1+ cpu) ( 8. 0. 1)
Building wheels for collected packages: future
Building wheel for future ( setup. py) . . . done
Created wheel for future: filename=future- 0. 18. 2- py3- none- any. whl size=491058 sha256=78364355f891d729e9dbde329ab7114ecea8a97a17ab8688ed04b9f35241461f
Stored in directory: / root/ . cache/ pip/ wheels/ f3/ f6/ 70/ 8b2bba44d8bf6ee5b7eac561416d9ef5c28dd2320490fc0f1f
Successfully built future
Installing collected packages: future, torch, torchvision
^CERROR: Operation cancelled by user
( tf2. 0) [root@idalei FdWebsite]
Looking in indexes: https:/ / pypi. tuna. tsinghua. edu. cn/ simple
Looking in links: https:/ / download. pytorch. org/ whl/ torch_stable. html
Requirement already satisfied: torch==1. 5. 1+ cpu in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( 1. 5. 1+ cpu)
Collecting torchvision==0. 6. 1+ cpu
Using cached https:/ / download. pytorch. org/ whl/ cpu/ torchvision- 0. 6. 1% 2Bcpu- cp36- cp36m- linux_x86_64. whl ( 5. 7 MB)
Requirement already satisfied: numpy in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( from torch==1. 5. 1+ cpu) ( 1. 18. 5)
Requirement already satisfied: future in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( from torch==1. 5. 1+ cpu) ( 0. 18. 2)
Requirement already satisfied: pillow>=4. 1. 1 in / root/ anaconda3/ envs/ tf2. 0/ lib/ python3. 6/ site- packages ( from torchvision==0. 6. 1+ cpu) ( 8. 0. 1)
Installing collected packages: torchvision
Successfully installed torchvision- 0. 6. 1+ cpu