반응형
나는조이
쑥쑥 크는 조이
나는조이
  • 분류 전체보기 (66)
    • 나누며 성장하기 (14)
      • Raktivist's Diary (4)
      • 성장 코칭 Growth Coaching (2)
      • 일상 · 생각 (8)
    • 읽고 성장하기 (1)
    • 공부하며 성장하기 (51)
      • 인공지능 AI (34)
      • AWS (1)
      • 파이썬 Python (6)
      • C# · WPF (1)
      • Fixing Errors (6)
      • 인사이트 리뷰 Insight Review (2)
      • AI-struction (1)

인기 글

최근 댓글

공지사항

  • def introduce(self):
전체 방문자
오늘
어제
ⓒ2022 @nanunzoey.All rights reserved.
hELLO · Designed By 정상우.
나는조이

쑥쑥 크는 조이

requirements.txt에서 URL로 PyTorch 설치하기
공부하며 성장하기/Fixing Errors

requirements.txt에서 URL로 PyTorch 설치하기

2022. 9. 21. 05:25

torch를 설치할 때 보통 여기서 다음 명령을 복사해 설치한다.
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

그런 다음 pip freeze > requirements.txt로 다음과 같은 requirements.txt 파일을 만들 수 있다.

# requirements.txt

albumentations==1.3.0
numpy==1.23.3
pytorch==1.12.0+cu113
torchvision==0.13.0+cu113
torchaudio==0.12.0+cu113

하지만 이를 그대로 다시 pip install -r requirements.txt로 설치하면 다음과 같은 에러가 난다.

ERROR: Could not find a version that satisfies the requirement torchaudio===0.12.0+cu113 (from versions: 0.6.0, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0)
ERROR: No matching distribution found for torchaudio===0.12.0+cu113

 

이럴 때에는 requirements.txt에 설치하기 위한 URL을 함께 써야 한다.

# requirements.txt

albumentations==1.3.0
numpy==1.23.3

--extra-index-url https://download.pytorch.org/whl/cu113
pytorch==1.12.0+cu113
--extra-index-url https://download.pytorch.org/whl/cu113
torchvision==0.13.0+cu113
--extra-index-url https://download.pytorch.org/whl/cu113
torchaudio==0.12.0+cu113

 

https://www.bairesdev.com

반응형

'공부하며 성장하기 > Fixing Errors' 카테고리의 다른 글

Docker Desktop shutting down 해결  (0) 2024.02.22
Loss function returned Nan values 해결  (0) 2023.12.08
AWS ECR 이미지와 lambda로 딥러닝 Serverless 서비스 만들기 - UnicodeDecodeError 해결  (0) 2023.06.13
torch.load 시 _pickle.UnpicklingError: invalid load key 해결  (0) 2022.10.29
torch.cuda.is_available() False 해결  (2) 2022.06.11
    '공부하며 성장하기/Fixing Errors' 카테고리의 다른 글
    • Loss function returned Nan values 해결
    • AWS ECR 이미지와 lambda로 딥러닝 Serverless 서비스 만들기 - UnicodeDecodeError 해결
    • torch.load 시 _pickle.UnpicklingError: invalid load key 해결
    • torch.cuda.is_available() False 해결
    나는조이
    나는조이
    매일 쑥쑥 크는 성장기를 담습니다.

    티스토리툴바