프로그래밍/Python

[python] Could not find a version that satisfies the requirement torch==1.11.0+cu113

채윤아빠 2023. 10. 1. 13:06
728x90
반응형

문제점 및 증상

"PyTorch v1.11.0+cu113"를 설치하는 과정에서 다음과 같은 오류를 만났습니다.

$ pip install torch==1.11.0+cu113
ERROR: Could not find a version that satisfies the requirement torch==1.11.0+cu113 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0)
ERROR: No matching distribution found for torch==1.11.0+cu113

시험 환경

  • HW: Intel i5 / 16GB RAM
  • GPU: NVIDIA RTX 3070
  • Ubuntu: 22.04 LTS
  • Python: 3.10.12

해결 방법

"PyTorch v1.11.0+cu113"를 설치하기 위하여 "--extra-index-url" 옵션을 추가해 주면 올바로 설치가 됩니다.

$ pip install --extra-index-url https://download.pytorch.org/whl/cu113 torch==1.11.0+cu113
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
Collecting torch==1.11.0+cu113
  Downloading https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp310-cp310-linux_x86_64.whl (1637.0 MB)

참고자료

"Could not find a version that satisfies the requirement torch>=1.0.0?":https://stackoverflow.com/questions/56239310/