Anaconda toss note (1)

Anaconda toss record

I would like to record the white inside fought in Anaconda

Update replacement source

You can not use the command directly into the C drive, enter the user folder, enter the current user folder, remember to show hidden files.

.Condarc find the file, open Notepad, replace as follows:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
ssl_verify: true

Save to close, thus replaced Tsinghua mirror. The first pytorch can not add, that is only needed to install pytorch.

Command, then, is to use:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

Update the library (strongly recommended to operate after replacing source)

After installing the anaconda is best to update the look inside all the libraries, because libraries installation package may already have some updates, in order to facilitate follow-up needs to be updated.

Note: Make sure the user permissions before you install or upgrade , use the Anaconda operates the job belongs to the user or super administrator. If you are a Windows user, right-click Anaconda Prompt and choose "Run as administrator" is not the problem.

#指定升级某个库文件,例如numpy: 
conda update numpy
#自动检测并升级Anaconda管理器中的所有可升级的库:
conda update --all

Adding Environment Variables

Right-click on My Computer -> Properties - "Advanced System Settings -" Environment Variables

If you want personal use, then it would set on top of the user variables, specifically is click Path, and then add the Anaconda installation directory of the directory path Scripts.

If you want to give all users, then it would set up in the following system variables, specifically that Path, and then add the path anaconda installation directory Scripts directory.

Installation pytorch (CPU) version

Enter the official website , then see a configuration diagram, CUDA in a bar select None, under the command will display the corresponding installation

这里配置是
    pytorch stable 1.3
    windows os
    package conda
    language python 3.7
    CUDA None
    显示的命令就是:conda install pytorch torchvision cpuonly -c pytorch

When done in pycharm console input command to see if the installation was successful

Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] on win32
import torch
torch.__version__
Out[3]: '1.3.1'
torch.cuda.is_available()
Out[4]: False

It should be noted: Remove the last installation command \ (- c \ pytorch \) , will adopt Tsinghua source installation, I ran into this pit> ︿ <.

Guess you like

Origin www.cnblogs.com/alking1001/p/11938400.html