Season 1 아카이브/프로그래밍
                
              Conda 가상 환경으로 PyTorch 설치하기
                문장전달자
                 2019. 1. 19. 12:08
              
              
                    
        728x90
    
    
  https://pytorch.org/get-started/locally/
자신의 환경에 맞게 선택하면 명령어를 제공해준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85  | (base) founder@hilbert:~$ conda install pytorch-cpu torchvision-cpu -c pytorch Solving environment: done ## Package Plan ##   environment location: /home/founder/anaconda3   added / updated specs:     - pytorch-cpu     - torchvision-cpu The following packages will be downloaded:     package                    |            build     ---------------------------|-----------------     pytorch-cpu-1.0.0          |      py3.7_cpu_1        29.5 MB  pytorch     cryptography-2.4.2         |   py37h1ba5d50_0         607 KB     conda-4.5.12               |           py37_0         1.0 MB     libssh2-1.8.0              |       h1ba5d50_4         233 KB     torchvision-cpu-0.2.1      |             py_2          37 KB  pytorch     krb5-1.16.1                |       h173b8e3_7         1.4 MB     numpy-base-1.15.4          |   py37hde5b4d6_0         4.2 MB     libcurl-7.63.0             |    h20c2e04_1000         550 KB     curl-7.63.0                |    hbc83047_1000         145 KB     libpng-1.6.36              |       hbc83047_0         346 KB     mkl_fft-1.0.10             |   py37ha843d7b_0         169 KB     pycurl-7.43.0.2            |   py37h1ba5d50_0         185 KB     mkl_random-1.0.2           |   py37hd81dba3_0         405 KB     ninja-1.8.2                |   py37h6bb024c_1         1.3 MB     numpy-1.15.4               |   py37h7e9f1db_0          47 KB     ------------------------------------------------------------                                            Total:        40.2 MB The following NEW packages will be INSTALLED:     krb5:            1.16.1-h173b8e3_7     ninja:           1.8.2-py37h6bb024c_1     pytorch-cpu:     1.0.0-py3.7_cpu_1       pytorch     torchvision-cpu: 0.2.1-py_2              pytorch The following packages will be UPDATED:     certifi:         2018.8.24-py37_1                    --> 2018.11.29-py37_0     conda:           4.5.11-py37_1000        conda-forge --> 4.5.12-py37_0     cryptography:    2.3.1-py37hc365091_0                --> 2.4.2-py37h1ba5d50_0     curl:            7.61.0-h84994c4_0                   --> 7.63.0-hbc83047_1000     libcurl:         7.61.0-h1ad7b7a_0                   --> 7.63.0-h20c2e04_1000     libpng:          1.6.34-hb9fc6fc_0                   --> 1.6.36-hbc83047_0     libssh2:         1.8.0-h9cfc8f7_4                    --> 1.8.0-h1ba5d50_4     mkl:             2019.0-118                          --> 2019.1-144     mkl_fft:         1.0.4-py37h4414c95_1                --> 1.0.10-py37ha843d7b_0     mkl_random:      1.0.1-py37h4414c95_1                --> 1.0.2-py37hd81dba3_0     numpy:           1.15.1-py37h1d66e8a_0               --> 1.15.4-py37h7e9f1db_0     numpy-base:      1.15.1-py37h81de0dd_0               --> 1.15.4-py37hde5b4d6_0     openssl:         1.0.2p-h14c3975_0                   --> 1.1.1a-h7b6447c_0     pycurl:          7.43.0.2-py37hb7f436b_0             --> 7.43.0.2-py37h1ba5d50_0     python:          3.7.0-hc3d631a_0                    --> 3.7.2-h0371630_0     qt:              5.9.6-h8703b6f_2                    --> 5.9.7-h5867ecd_1     sqlite:          3.24.0-h84994c4_0                   --> 3.26.0-h7b6447c_0 Proceed ([y]/n)? y Downloading and Extracting Packages pytorch-cpu-1.0.0    | 29.5 MB   | ################################################################################################ | 100% cryptography-2.4.2   | 607 KB    | ################################################################################################ | 100% conda-4.5.12         | 1.0 MB    | ################################################################################################ | 100% libssh2-1.8.0        | 233 KB    | ################################################################################################ | 100% torchvision-cpu-0.2. | 37 KB     | ################################################################################################ | 100% krb5-1.16.1          | 1.4 MB    | ################################################################################################ | 100% numpy-base-1.15.4    | 4.2 MB    | ################################################################################################ | 100% libcurl-7.63.0       | 550 KB    | ################################################################################################ | 100% curl-7.63.0          | 145 KB    | ################################################################################################ | 100% libpng-1.6.36        | 346 KB    | ################################################################################################ | 100% mkl_fft-1.0.10       | 169 KB    | ################################################################################################ | 100% pycurl-7.43.0.2      | 185 KB    | ################################################################################################ | 100% mkl_random-1.0.2     | 405 KB    | ################################################################################################ | 100% ninja-1.8.2          | 1.3 MB    | ################################################################################################ | 100% numpy-1.15.4         | 47 KB     | ################################################################################################ | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done (base) founder@hilbert:~$  | cs | 
설치된 PyTorch 버전확인
1 2  | ~$ python -c "import torch; print(torch.__version__)" 1.0.0  | cs | 
728x90