First you installed the Anaconda
If not, please refer to my another blog post (which Anaconda installation package)
link: Anaconda
1.
Anaconda Prompt into the environment
to check whether the installation was successful: the pop-up window has(base)The installation successfully
create a virtual environment after: Enter Conda the Create -n pytorch Python = 3.6 (that has been entered in the above chart inside)
image is this just a shell, then this environment is not pytorch, like a house inside no furniture.
2 .
As box will appear after entering conda command:
where the red rectangle in this environment you need to install the packages (like a house of furniture)
after asking if you agree to download: Enter y
to continue downloading ...
3.
After downloading asking whether to activate pytorch environment
enter:conda activate pytorchActivate
and then (base) becomespytorchactivated
Use pip list command to check environment package
found no pytorch
(nugget: We certainly did not download ah ah ah)
4.
Download pytorch
enter PyTorch official website
now has a previous 1.4 version is 1.3
if you want to download the old version https://pytorch.org/get-started/previous-versions/ (red body is above URLs)
explanation points:
- If the Anaconda installed on your computer is recommended to choose Condainstallation;
- CUDA: support GPU can go to this website for their own GPU support, directory so, we choose9.2Version, since 10.1 might be some problems;
- Of course, you can also choose affect none, GPU just our speed;
Copy the following red box after good selection instruction:
enter the environment copy and paste:
Then follows the installation package start supra.
Because here it is the foreign source so the installation time may be relatively long
it is proposed to replace it yourself, manually Tsinghua source (link tutorial point I )
Which pytorch-1.4.0 and two cudatoolkit-9.2 package may fail to install
I've been just great on Baidu network disk inside:
Packet
extraction code: dwtc
5.
After installation using:
PIP List instruction checks all packages, and to see their own package exists pytorch
sequentially input:. 1 python (python into the environment)
2. Import Torch (i.e., no error successfully installed)
3. torch.cuda.is_available () (check if your GPU can be used, if the return TURE, the installation is complete)