chap3

pytorch 配置对应的cuda


(base) C:\Users\小城独困>activate line_detect

(line_detect) C:\Users\小城独困>conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -nvidia

EnvironmentLocationNotFound: Not a conda environment: F:\software_plus\conda\conda1\envs\vidia


(line_detect) C:\Users\小城独困>pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://download.pytorch.org/whl/cu117
Collecting torch==1.13.1+cu117
  Downloading https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp39-cp39-win_amd64.whl (2255.6 MB)
     ---------------------------------------- 2.3/2.3 GB 1.5 MB/s eta 0:00:00
Collecting torchvision==0.14.1+cu117
  Downloading https://download.pytorch.org/whl/cu117/torchvision-0.14.1%2Bcu117-cp39-cp39-win_amd64.whl (4.8 MB)
     ---------------------------------------- 4.8/4.8 MB 4.9 MB/s eta 0:00:00
Collecting torchaudio==0.13.1
  Downloading https://download.pytorch.org/whl/cu117/torchaudio-0.13.1%2Bcu117-cp39-cp39-win_amd64.whl (2.3 MB)
     ---------------------------------------- 2.3/2.3 MB 8.1 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from torch==1.13.1+cu117) (4.5.0)
Requirement already satisfied: requests in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from torchvision==0.14.1+cu117) (2.28.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from torchvision==0.14.1+cu117) (9.4.0)
Requirement already satisfied: numpy in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from torchvision==0.14.1+cu117) (1.24.2)
Requirement already satisfied: idna<4,>=2.5 in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from requests->torchvision==0.14.1+cu117) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from requests->torchvision==0.14.1+cu117) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from requests->torchvision==0.14.1+cu117) (1.26.14)
Requirement already satisfied: charset-normalizer<4,>=2 in f:\software_plus\conda\conda1\envs\line_detect\lib\site-packages (from requests->torchvision==0.14.1+cu117) (3.0.1)
Installing collected packages: torch, torchvision, torchaudio
  Attempting uninstall: torch
    Found existing installation: torch 1.13.1
    Uninstalling torch-1.13.1:
      Successfully uninstalled torch-1.13.1
  Attempting uninstall: torchvision
    Found existing installation: torchvision 0.14.1
    Uninstalling torchvision-0.14.1:
      Successfully uninstalled torchvision-0.14.1
Successfully installed torch-1.13.1+cu117 torchaudio-0.13.1+cu117 torchvision-0.14.1+cu117

基础环境,更改源为清华源


(base) C:\Windows\system32>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

(base) C:\Windows\system32>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

(base) C:\Windows\system32>conda config --set show_channel_urls yes

(base) C:\Windows\system32>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

(base) C:\Windows\system32>

猜你喜欢

转载自blog.csdn.net/Android_WPF/article/details/129675172