ERROR

[PyTorch] Could not find a version that satisfies the requirement torch>=1.10.0 (from recbole) (from versions: none)

alsruds 2024. 9. 13. 01:58
ERROR: Could not find a version that satisfies the requirement torch>=1.10.0 (from recbole) (from versions: none)
ERROR: No matching distribution found for torch>=1.10.0

 

해결 방법 미리 보기
✔️ Python 버전이 3.8 ~ 3.10 사이어야 한다
✔️ Python 과 Pip 버전이 같아야 한다
✔️ 설치된 Python 이 (64bit) 여야 한다고 한다

 

 

RecBole 모델 Spring Boot 에서 쓰려고 clone 한 다음에

>> pip install -e . --verbose

 

했더니 torch 설치가 안된다

(왜!!)

 

당시에는 python 3.12 버전을 쓰고 있었는데,

버전이 안맞다는 오류 메세지가 나왔다 (3.7부턴가 3.8부터 3.10 사이 버전이어야 된다는 오류 메세지!! 였는데 캡처는 못함)

 

Stack Overflow 보니까 사람들이 ...https://stackoverflow.com/questions/56239310/could-not-find-a-version-that-satisfies-the-requirement-torch-1-0-0

 

Could not find a version that satisfies the requirement torch>=1.0.0?

Could not find a version that satisfies the requirement torch>=1.0.0 No matching distribution found for torch>=1.0.0 (from stanfordnlp)

stackoverflow.com

 

그래서 이것저것 가지고 있던 python 중에 3.10 으로 바꿔줬다

근데도 안돼!!!

 

그래서 속는 셈 치고 Python 3.9 버전으로 64 bit 골라서 기기에 설치 ..하고 환경 변수 등록까지 해줌

 

Download Python

The official home of the Python Programming Language

www.python.org

 

근데 Path 에 등록해주고 IntelliJ 에서 python interpreter 도 바꿔줬는데

 

>> python --version

해도 자꾸 3.10 이 그대로 나와

 

GPT 야 도와줘 ☠️

물어봤더니 export PATH 명령어 쓰라네요

>> export PATH="설치한 python.exe가 있는 경로:$PATH"

 

그리고 저장하고 적용하는 명령어

>> source ~/.bashrc 또는 source ~/.zshrc

 

그랬더니 

새로 설치한 3.9 등장 ...

 

근데 pip 는 그대로야 (아오)

 

하지만 python 버전대로 pip 쓰는 방법 저는 알고 있습니다

그건 바로 .....

 

💫 가상 환경 만들기 💫

>> python -m venv venv

>> source venv/Scripts/activate

pip 도 3.9 버전으로 등장 !!!

 

그렇다면 ... 대망의 설치 시간

..... 설치 순항 중 .....

설치됐다!!!! 

Warning 은 가볍게 무시

 

가뜩이나 RecBole 쓰는 거 어려워 죽겠는데 설치부터 난항이라 울고 있었네요

그치만 난 성공할거야 !!

 

 

다음 단계로 넘어가자 ~~~~