pytorch python installation and the installation fails Solution
[Turn] pytorch installation fails Solution
[Rpm] for one minute win10 terminal successfully installed pytorch
pytorch installation methods have two kinds, one pip is installed, and the other is to download whl file and then installed locally.
Method a: pip install
You might think directly
pip install torch
But this will be an error , the installation fails. So, you can go to the [ official website ] to find the corresponding version to download.
1. Click to enter official website
Started 2. Click on the Get , in accordance with its own configuration, select the appropriate option, and finally copy the generated commands to the terminal, the right mouse button to paste, press Enter to implement to achieve installed.
Since I did not install any library, so it will automatically required dependencies are downloaded.
3. There is no test success
Actually show Import error ! ! !
Fortunately, the solution found on the Internet, found numpy version of the problem, for a numpy library on the line.
[In this site to download the corresponding numpy + mkl] in the corresponding packet to the next directory, then execute the following command can be installed in the terminal. I downloaded the "numpy-1.16.5-cp37-cp37m -win_amd64.whl".
pip install the file name
4. re-test:
Perfect !
Method two: local installation
1. [ this site ] to download the corresponding numpy + mkl package , as above, use the command to install pip
2. 在【此网站】下载对应的torch包
3. 测试一下
Perfect !