How to install the Pytorch in win10?

1. Install Anaconda3-2018.12-Windows-x86_64.exe (Note that if you want to use python 2.X, you need to choose Anaconda2-X)

2. Install Windows x86-64 executable installer

3. Install Pycharm (If you're a student, you can register using your university email. Then you can download the professional version and use it for free. )

4. Install Pytorch

Open the Anaconda Prompt as an administrator, and then input "conda create -n torch python=3.7".

Then, input "activate torch".

Next, you can install the pytorch using the following command according to your setup and devices.

-----conda install pytorch-cpu torchvision-cpu -c pytorch (this command adapts to my setup)

before that, you need to input this command "pip install torchvision", and then you can success to install the pytorch.

To varify that, you can input following command by python:

     # Pytorch Test

      import torch

      x = torch.Tensor([1.0])

      print(x)

By input "exit()", you can exit the python environment.

猜你喜欢

转载自blog.csdn.net/qq_37471316/article/details/86006654