관리 메뉴

me made it !

가상환경 구축 후 파이토치 설치 방법 본문

TIL

가상환경 구축 후 파이토치 설치 방법

yeoney 2023. 6. 16. 15:11
반응형

1. 가상환경 구축

아나콘다 프롬프트  관리자 권한으로 실행 

2. 가상환경 만들기 

conda create -n 가상환경명칭 python==3.8

2 -1 ) proceed ? = > y 입력

 

3. 가상환경 접속

conda activate 가상환경명칭

 

 

 

pytorch 설치

https://pytorch.org/

 

PyTorch

An open source machine learning framework that accelerates the path from research prototyping to production deployment.

pytorch.org

 

gpu 가 있다?

conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge

 

아니? 없다 ! 

pip install torch==1.10.0+cpu torchvision==0.11.0+cpu torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html

 

proceed? y 입력 ! 

 

설치 확인 

python
import torch
import torchvision
 
print("Torch 버전:", torch.__version__)
print("Torchvision 버전:", torchvision.__version__)
반응형