Pytorch currently supports the platform has Linux and OSX, on the Pytorch website each platform provides Conda, Pip, source three kinds of installation methods, but also can be based on the GPU for CUDA installation, here to ubuntu14.04 for installation learning.
1. Anaconda Installation Configuration
The installation process references my previous Anaconda+tensorflow+theano+keras installation blog.
Due to wall problems, installing pytorch with Conda will fail during the process because the anaconda.org server is abroad. Here you can use the Tsinghua tuna image source, including the Anaconda warehouse image, add it to the Conda configuration, configured as follows:
# Add Anaconda Tuna Mirror
$ conda config--add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# Tuna's help in the mirror address with quotation marks, need to remove the
# Setting search Display Channel address
$ conda config--set show_channel_urls Yes
After executing the above command, the ~/.condarc file is generated and the configuration of the Conda is recorded, and it is the same effect to manually create and edit the file directly.
2. Pytorch installation
Here for installation, I use Conda installation:
$ Conda Install Pytorch torchvision-c soumith
3. Testing
Enter Python mode to see if you can import torch successfully:
$ python
> import Torch