anaconda+pytorch安裝

1. anaconda安裝python

官網下載Anaconda3-5.0.1-MacOSX-x86_64.pkg 點擊安裝ui

安裝完成後,可使用anaconda navigator,包括jupyter和spyderspa

2. pytorch安裝3d

官網的點擊是無響應的,根據提示使用終端,輸入ssl

conda install pytorch=0.2.0 -c soumithci

詢問是否肯定安裝而且對響應對包update,選擇y,回車。openssl

安裝完畢,以下it

 

Fetching package metadata .............io

Solving package specifications: .class

 

Package plan for installation in environment /Users/Anenyang/anaconda3:

 

The following NEW packages will be INSTALLED:

 

    pytorch:  0.2.0-py36_4cu75      soumith

 

The following packages will be UPDATED:

 

    anaconda: 5.0.1-py36h6e48e2d_1          --> custom-py36ha4fed55_0

    conda:    4.3.30-py36h173c244_0         --> 4.4.8-py36_0         

    pycosat:  0.6.2-py36h1486600_0          --> 0.6.3-py36hee92d8f_0 

 

Proceed ([y]/n)? y

 

anaconda-custo 100% |################################| Time: 0:00:00   1.38 MB/s

pycosat-0.6.3- 100% |################################| Time: 0:00:00 113.86 kB/s

pytorch-0.2.0- 100% |################################| Time: 0:00:29 172.88 kB/s

conda-4.4.8-py 100% |################################| Time: 0:00:32  29.42 kB/s

 

3. 問題

使用conda install pytorch=0.2.0 -c soumith這個命令只是安裝torch(指定版本),而沒有torchvision

 

使用conda install pytorch torchvision -c soumith將會安裝torch 和 torchvision

沒有cuda就不指定其版本,且不須要指定python的版本,具體安裝以下:

 

anenyangdeMacBook-Air:~ Anenyang$ conda install pytorch torchvision -c soumith

Solving environment: done

 

## Package Plan ##

 

  environment location: /Users/Anenyang/anaconda3

 

  added / updated specs: 

    - pytorch

    - torchvision

 

 

The following packages will be downloaded:

 

    package                    |            build

    ---------------------------|-----------------

    certifi-2018.1.18          |           py36_0         143 KB

    torchvision-0.1.9          |           py36_1          86 KB  soumith

    openssl-1.0.2n             |       hdbc3d79_0         3.4 MB

    ------------------------------------------------------------

                                           Total:         3.6 MB

 

The following NEW packages will be INSTALLED:

 

    torchvision: 0.1.9-py36_1               soumith

 

The following packages will be UPDATED:

 

    certifi:     2017.7.27.1-py36hd973bb6_0         --> 2018.1.18-py36_0 

    openssl:     1.0.2l-h57f3a61_2                  --> 1.0.2n-hdbc3d79_0

 

Proceed ([y]/n)? y

 

 

Downloading and Extracting Packages

certifi 2018.1.18: ########################################################################################### | 100% 

torchvision 0.1.9: ########################################################################################### | 100% 

openssl 1.0.2n: ############################################################################################## | 100% 

Preparing transaction: done

Verifying transaction: done

Executing transaction: done

相關文章
相關標籤/搜索