当前位置:   article > 正文

真实机下 ubuntu 18.04 安装anaconda+cuDNN+pytorch以及其版本选择(亲测非常实用)_anaconda哪个版本适合ubuntu18.04

anaconda哪个版本适合ubuntu18.04

推荐这个博客:有版本对应关系查询:

https://blog.csdn.net/qq_18483627/article/details/105885483?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-22.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-22.nonecase版本对应查询

一、安装Anaconda

使用镜像下载:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

zhenghan@zhenghan:~$ cd Software/
zhenghan@zhenghan:~/Software$ ls
Anaconda3-5.0.1-Linux-x86_64.sh         pycharm-2019.2.6
cuda_10.1.105_418.39_linux.run          永久激活
google-chrome-stable_current_amd64.deb
zhenghan@zhenghan:~/Software$ sh Anaconda3-5.0.1-Linux-x86_64.sh

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Welcome to Anaconda3 5.0.1
 
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 按回车
#然后一直按回车到协议完毕
#出现:
Do you accept the license terms? [yes|no]
>>>输入yes
#下面就是问你安装目录,建议就是默认的安装路径,直接按回车
Anaconda3 will now be installed into this location:
/home/mayunteng/anaconda3
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/home/mayunteng/anaconda3] >>> 按回车
#接下来就是等待安装完成
#注意安装完成以后会询问你是否把anaconda3的路径加到环境变量里去,一定要选yes,一定要选yes,一定要选yes。
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

安装完成以后,重启终端,依次输入下面的指令,如果显示的是anaconda版本的python,代表安装成功。

henghan@zhenghan:~/Software$ source ~/.bashrc
zhenghan@zhenghan:~/Software$ python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

也可以通过 conda list 查看

zhenghan@zhenghan:~/Software$ conda list
# packages in environment at /home/zhenghan/anaconda3:
#
_ipyw_jlab_nb_ext_conf    0.1.0            py36he11e457_0  
alabaster                 0.7.10           py36h306e16b_0  
anaconda                  5.0.1            py36hd30a520_1  
anaconda-client           1.6.5            py36h19c0dcd_0  
anaconda-navigator        1.6.9            py36h11ddaaa_0  
anaconda-project          0.8.0            py36h29abdf5_0  
asn1crypto                0.22.0           py36h265ca7c_1  
astroid                   1.5.3            py36hbdb9df2_0  
astropy                   2.0.2            py36ha51211e_4  
babel                     2.5.0            py36h7d14adf_0  
backports                 1.0              py36hfa02d7e_1  
backports.shutil_get_terminal_size 1.0.0            py36hfea85ff_2  
beautifulsoup4            4.6.0            py36h49b8c8c_1  
bitarray                  0.8.1            py36h5834eb8_0  
bkcharts                  0.2              py36h735825a_0  
blaze                     0.11.3           py36h4e06776_0  
bleach                    2.0.0            py36h688b259_0  
bokeh                     0.12.10          py36hbb0e44a_0  
boto                      2.48.0           py36h6e4cd66_1  
bottleneck                1.2.1            py36haac1ea0_0  
bzip2                     1.0.6                h0376d23_1  
ca-certificates           2017.08.26           h1d4fec5_0  
cairo                     1.14.10              haa5651f_5  
certifi                   2017.7.27.1      py36h8b7b77e_0  
cffi                      1.10.0           py36had8d393_1  
chardet                   3.0.4            py36h0f667ec_1  
click                     6.7              py36h5253387_0  
cloudpickle               0.4.0            py36h30f8c20_0  
clyent                    1.2.2            py36h7e57e65_1  
colorama                  0.3.9            py36h489cec4_0  
conda                     4.3.30           py36h5d9f9f4_0  
conda-build               3.0.27           py36h940a66d_0  
conda-env                 2.6.0                h36134e3_1  
conda-verify              2.0.0            py36h98955d8_0  
contextlib2               0.5.5            py36h6c84a62_0  
cryptography              2.0.3            py36ha225213_1  
curl                      7.55.1               hcb0b314_2  
cycler                    0.10.0           py36h93f1223_0  
cython                    0.26.1           py36h21c49d0_0  
cytoolz                   0.8.2            py36h708bfd4_0  
dask                      0.15.3           py36hdc2c8aa_0  
dask-core                 0.15.3           py36h10e6167_0  
datashape                 0.5.4            py36h3ad6b5c_0  
dbus                      1.10.22              h3b5a359_0  
decorator                 4.1.2            py36hd076ac8_0  
distributed               1.19.1           py36h25f3894_0  
docutils                  0.14             py36hb0f60f5_0  
entrypoints               0.2.3            py36h1aec115_2  
et_xmlfile                1.0.1            py36hd6bccc3_0  
expat                     2.2.4                hc00ebd1_1  
fastcache                 1.0.2            py36h5b0c431_0  
filelock                  2.0.12           py36hacfa1f5_0  
flask                     0.12.2           py36hb24657c_0  
flask-cors                3.0.3            py36h2d857d3_0  
fontconfig                2.12.4               h88586e7_1  
freetype                  2.8                  h52ed37b_0  
get_terminal_size         1.0.0                haa9412d_0  
gevent                    1.2.2            py36h2fe25dc_0  
glib                      2.53.6               hc861d11_1  
glob2                     0.5              py36h2c1b292_1  
gmp                       6.1.2                hb3b607b_0  
gmpy2                     2.0.8            py36h55090d7_1  
graphite2                 1.3.10               hc526e54_0  
greenlet                  0.4.12           py36h2d503a6_0  
gst-plugins-base          1.12.2               he3457e5_0  
gstreamer                 1.12.2               h4f93127_0  
h5py                      2.7.0            py36he81ebca_1  
harfbuzz                  1.5.0                h2545bd6_0  
hdf5                      1.10.1               hb0523eb_0  
heapdict                  1.0.0            py36h79797d7_0  
html5lib                  0.999999999      py36h2cfc398_0  
icu                       58.2                 h211956c_0  
idna                      2.6              py36h82fb2a8_1  
imageio                   2.2.0            py36he555465_0  
imagesize                 0.7.1            py36h52d8127_0  
intel-openmp              2018.0.0             h15fc484_7  
ipykernel                 4.6.1            py36hbf841aa_0  
ipython                   6.1.0            py36hc72a948_1  
ipython_genutils          0.2.0            py36hb52b0d5_0  
ipywidgets                7.0.0            py36h7b55c3a_0  
isort                     4.2.15           py36had401c0_0  
itsdangerous              0.24             py36h93cc618_1  
jbig                      2.1                  hdba287a_0  
jdcal                     1.3              py36h4c697fb_0  
jedi                      0.10.2           py36h552def0_0  
jinja2                    2.9.6            py36h489bce4_1  
jpeg                      9b                   habf39ab_1  
jsonschema                2.6.0            py36h006f8b5_0  
jupyter                   1.0.0            py36h9896ce5_0  
jupyter_client            5.1.0            py36h614e9ea_0  
jupyter_console           5.2.0            py36he59e554_1  
jupyter_core              4.3.0            py36h357a921_0  
jupyterlab                0.27.0           py36h86377d0_2  
jupyterlab_launcher       0.4.0            py36h4d8058d_0  
lazy-object-proxy         1.3.1            py36h10fcdad_0  
libedit                   3.1                  heed3624_0  
libffi                    3.2.1                h4deb6c0_3  
libgcc-ng                 7.2.0                h7cc24e2_2  
libgfortran-ng            7.2.0                h9f7466a_2  
libpng                    1.6.32               hda9c8bc_2  
libsodium                 1.0.13               h31c71d8_2  
libssh2                   1.8.0                h8c220ad_2  
libstdcxx-ng              7.2.0                h7a57d05_2  
libtiff                   4.0.8                h90200ff_9  
libtool                   2.4.6                hd50d1a6_0  
libxcb                    1.12                 h84ff03f_3  
libxml2                   2.9.4                h6b072ca_5  
libxslt                   1.1.29               hcf9102b_5  
llvmlite                  0.20.0                   py36_0  
locket                    0.2.0            py36h787c0ad_1  
lxml                      4.1.0            py36h5b66e50_0  
lzo                       2.10                 h1bfc0ba_1  
markupsafe                1.0              py36hd9260cd_1  
matplotlib                2.1.0            py36hba5de38_0  
mccabe                    0.6.1            py36h5ad9710_1  
mistune                   0.7.4            py36hbab8784_0  
mkl                       2018.0.0             hb491cac_4  
mkl-service               1.1.2            py36h17a0993_4  
mpc                       1.0.3                hf803216_4  
mpfr                      3.1.5                h12ff648_1  
mpmath                    0.19             py36h8cc018b_2  
msgpack-python            0.4.8            py36hec4c5d1_0  
multipledispatch          0.4.9            py36h41da3fb_0  
navigator-updater         0.1.0            py36h14770f7_0  
nbconvert                 5.3.1            py36hb41ffb7_0  
nbformat                  4.4.0            py36h31c9010_0  
ncurses                   6.0                  h06874d7_1  
networkx                  2.0              py36h7e96fb8_0  
nltk                      3.2.4            py36h1a0979f_0  
nose                      1.3.7            py36hcdf7029_2  
notebook                  5.0.0            py36h0b20546_2  
numba                     0.35.0             np113py36_10  
numexpr                   2.6.2            py36hdd3393f_1  
numpy                     1.13.3           py36ha12f23b_0  
numpydoc                  0.7.0            py36h18f165f_0  
odo                       0.5.1            py36h90ed295_0  
olefile                   0.44             py36h79f9f78_0  
openpyxl                  2.4.8            py36h41dd2a8_1  
openssl                   1.0.2l               h077ae2c_5  
packaging                 16.8             py36ha668100_1  
pandas                    0.20.3           py36h842e28d_2  
pandoc                    1.19.2.1             hea2e7c5_1  
pandocfilters             1.4.2            py36ha6701b7_1  
pango                     1.40.11              h8191d47_0  
partd                     0.3.8            py36h36fd896_0  
patchelf                  0.9                  hf79760b_2  
path.py                   10.3.1           py36he0c6f6d_0  
pathlib2                  2.3.0            py36h49efa8e_0  
patsy                     0.4.1            py36ha3be15e_0  
pcre                      8.41                 hc71a17e_0  
pep8                      1.7.0            py36h26ade29_0  
pexpect                   4.2.1            py36h3b9d41b_0  
pickleshare               0.7.4            py36h63277f8_0  
pillow                    4.2.1            py36h9119f52_0  
pip                       9.0.1            py36h8ec8b28_3  
pixman                    0.34.0               h83dc358_2  
pkginfo                   1.4.1            py36h215d178_1  
ply                       3.10             py36hed35086_0  
prompt_toolkit            1.0.15           py36h17d85b1_0  
psutil                    5.4.0            py36h84c53db_0  
ptyprocess                0.5.2            py36h69acd42_0  
py                        1.4.34           py36h0712aa3_1  
pycodestyle               2.3.1            py36hf609f19_0  
pycosat                   0.6.2            py36h1a0ea17_1  
pycparser                 2.18             py36hf9f622e_1  
pycrypto                  2.6.1            py36h6998063_1  
pycurl                    7.43.0           py36h5e72054_3  
pyflakes                  1.6.0            py36h7bd6a15_0  
pygments                  2.2.0            py36h0d3125c_0  
pylint                    1.7.4            py36hb9d4533_0  
pyodbc                    4.0.17           py36h999153c_0  
pyopenssl                 17.2.0           py36h5cc804b_0  
pyparsing                 2.2.0            py36hee85983_1  
pyqt                      5.6.0            py36h0386399_5  
pysocks                   1.6.7            py36hd97a5b1_1  
pytables                  3.4.2            py36h3b5282a_2  
pytest                    3.2.1            py36h11ad3bb_1  
python                    3.6.3                hc9025b9_1  
python-dateutil           2.6.1            py36h88d3b88_1  
pytz                      2017.2           py36hc2ccc2a_1  
pywavelets                0.5.2            py36he602eb0_0  
pyyaml                    3.12             py36hafb9ca4_1  
pyzmq                     16.0.2           py36h3b0cf96_2  
qt                        5.6.2               h974d657_12  
qtawesome                 0.4.4            py36h609ed8c_0  
qtconsole                 4.3.1            py36h8f73b5b_0  
qtpy                      1.3.1            py36h3691cc8_0  
readline                  7.0                  hac23ff0_3  
requests                  2.18.4           py36he2e5f8d_1  
rope                      0.10.5           py36h1f8c17e_0  
ruamel_yaml               0.11.14          py36ha2fb22d_2  
scikit-image              0.13.0           py36had3c07a_1  
scikit-learn              0.19.1           py36h7aa7ec6_0  
scipy                     0.19.1           py36h9976243_3  
seaborn                   0.8.0            py36h197244f_0  
setuptools                36.5.0           py36he42e2e1_0  
simplegeneric             0.8.1            py36h2cb9092_0  
singledispatch            3.4.0.3          py36h7a266c3_0  
sip                       4.18.1           py36h51ed4ed_2  
six                       1.11.0           py36h372c433_1  
snowballstemmer           1.2.1            py36h6febd40_0  
sortedcollections         0.5.3            py36h3c761f9_0  
sortedcontainers          1.5.7            py36hdf89491_0  
sphinx                    1.6.3            py36he5f0bdb_0  
sphinxcontrib             1.0              py36h6d0f590_1  
sphinxcontrib-websupport  1.0.1            py36hb5cb234_1  
spyder                    3.2.4            py36hbe6152b_0  
sqlalchemy                1.1.13           py36hfb5efd7_0  
sqlite                    3.20.1               h6d8b0f3_1  
statsmodels               0.8.0            py36h8533d0b_0  
sympy                     1.1.1            py36hc6d1c1c_0  
tblib                     1.3.2            py36h34cf8b6_0  
terminado                 0.6              py36ha25a19f_0  
testpath                  0.3.1            py36h8cadb63_0  
tk                        8.6.7                h5979e9b_1  
toolz                     0.8.2            py36h81f2dff_0  
tornado                   4.5.2            py36h1283b2a_0  
traitlets                 4.3.2            py36h674d592_0  
typing                    3.6.2            py36h7da032a_0  
unicodecsv                0.14.1           py36ha668878_0  
unixodbc                  2.3.4                hc36303a_1  
urllib3                   1.22             py36hbe7ace6_0  
wcwidth                   0.1.7            py36hdf4376a_0  
webencodings              0.5.1            py36h800622e_1  
werkzeug                  0.12.2           py36hc703753_0  
wheel                     0.29.0           py36he7f4e38_1  
widgetsnbextension        3.0.2            py36hd01bb71_1  
wrapt                     1.10.11          py36h28b7045_0  
xlrd                      1.1.0            py36h1db9f0c_1  
xlsxwriter                1.0.2            py36h3de1aca_0  
xlwt                      1.3.0            py36h7b00a1f_0  
xz                        5.2.3                h2bcbf08_1  
yaml                      0.1.7                h96e3832_1  
zeromq                    4.2.2                hb0b69da_1  
zict                      0.1.3            py36h3a3bf81_0  
zlib                      1.2.11               hfbfcf68_1  
zhenghan@zhenghan:~/Software$ 
  • 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
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240

二、安装cuDNN

NVIDIA cuDNN 是用于深度神经网络的 GPU 加速库。
首先是下载CUDNN,CUDA要对应CUDNN的版本,我选择的是CUDA10.1+CUDNN7.6.4的版本。只要记住CUDA的选择要根据CUDNN的型号来选,即CUDA的版本一定要和CUDNN的版本对应,必须是CUDNN支持的版本!
官网:https://developer.nvidia.com/cudnn
cuDNN是一个CUDA的一个加速配件,可以去https://developer.nvidia.com/rdp/cudnn-archive 下载(需要注册)
我选择的是cuDNN Library for Linux,下载成功
在这里插入图片描述
首先解压压缩包,然后执行:

zhenghan@zhenghan:~$ cd Software
zhenghan@zhenghan:~/Software$ ls
Anaconda3-5.0.1-Linux-x86_64.sh     google-chrome-stable_current_amd64.deb
cuda_10.1.105_418.39_linux.run      pycharm-2019.2.6
cudnn-10.1-linux-x64-v7.6.5.32.tgz  永久激活
zhenghan@zhenghan:~/Software$ tar -zxvf cudnn-10.1-linux-x64-v7.6.5.32.tgz 
cuda/include/cudnn.h
cuda/NVIDIA_SLA_cuDNN_Support.txt
cuda/lib64/libcudnn.so
cuda/lib64/libcudnn.so.7
cuda/lib64/libcudnn.so.7.6.5
cuda/lib64/libcudnn_static.a
zhenghan@zhenghan:~/Software$ 
zhenghan@zhenghan:~/Software$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
[sudo] zhenghan 的密码: 
zhenghan@zhenghan:~/Software$ 
zhenghan@zhenghan:~/Software$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64zhenghan@zhenghan:~/Software$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
zhenghan@zhenghan:~/Software$
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

验证安装是否成功:

zhenghan@zhenghan:~/Software$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

到此,CUDNN安装完成!

三、安装pytorch

pytorch下载网站:https://download.pytorch.org/whl/torch_stable.html
cu100表示CUDA10.0版本,cu101表示CUDA10.1版本

1.0.1和1.2.0表示具体的PyTorch版本

CP36表示python3.6版本,cp27表示python2.7版本

win_amd64表示Windows系统

官方的conda和pip安装方式我个人尝试了很多遍都没有成功,原因是下载torch文件的速度巨慢。找了清华和阿里云的多个镜像网站也没下载成功,最后在豆瓣的镜像上找到了whl安装文件。
http://pypi.doubanio.com/simple/torch/

我在https://pytorch.org/根据命令下载:
在这里插入图片描述

zhenghan@zhenghan:~$ pip install torch==1.4.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.4.0+cu101
  Could not find a version that satisfies the requirement torch==1.4.0+cu101 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.0.post4, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.2.0+cpu, 1.2.0+cu92, 1.3.0, 1.3.0+cpu, 1.3.0+cu100, 1.3.0+cu92, 1.3.1, 1.3.1+cpu, 1.3.1+cu100, 1.3.1+cu92, 1.4.0, 1.4.0+cpu, 1.4.0+cu100, 1.4.0+cu92, 1.5.0, 1.5.0+cpu, 1.5.0+cu101, 1.5.0+cu92)
No matching distribution found for torch==1.4.0+cu101
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

下载速度巨慢。。。。大家还是不要尝试了。。。
在豆瓣镜像中下载好之后,在下载文件目录下打开终端即可安装。

zhenghan@zhenghan:~$ cd Software/
zhenghan@zhenghan:~/Software$ ls
Anaconda3-5.0.1-Linux-x86_64.sh
cuda
cuda_10.1.105_418.39_linux.run
cudnn-10.1-linux-x64-v7.6.5.32.tgz
google-chrome-stable_current_amd64.deb
pycharm-2019.2.6
torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl
永久激活
zhenghan@zhenghan:~/Software$ pip install torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

恩。。。出错了

zhenghan@zhenghan:~/Software$ pip install torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl 
torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl is not a supported wheel on this platform.
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
zhenghan@zhenghan:~/Software$ pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 8.9kB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-20.1.1
zhenghan@zhenghan:~/Software$ pip install torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl 
ERROR: torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl is not a supported wheel on this platform.
zhenghan@zhenghan:~/Software$ 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

为什么呢???版本还是不对。。。

zhenghan@zhenghan:~/Software$ ls
Anaconda3-5.0.1-Linux-x86_64.sh
cuda
cuda_10.1.105_418.39_linux.run
cudnn-10.1-linux-x64-v7.6.5.32.tgz
deepin.com.qq.im_9.1.8deepin0_i386.deb
deepin.com.wechat_2.6.2.31deepin0_i386.deb
deepin-wine-for-ubuntu
google-chrome-stable_current_amd64.deb
pycharm-2019.2.6
torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl
torch-1.5.0-cp36-cp36m-manylinux1_x86_64.whl
永久激活
zhenghan@zhenghan:~/Software$ pip install torch-1.5.0-cp36-cp36m-manylinux1_x86_64.whl
Processing ./torch-1.5.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: numpy in /home/zhenghan/anaconda3/lib/python3.6/site-packages (from torch==1.5.0) (1.13.3)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 6.3 kB/s 
Building wheels for collected packages: future
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=493314 sha256=50fcc368ec3a68fdf90e64eabd0fb94a21835b2b9ea676b271c4287e1d26602e
  Stored in directory: /home/zhenghan/.cache/pip/wheels/6e/9c/ed/4499c9865ac1002697793e0ae05ba6be33553d098f3347fb94
Successfully built future
Installing collected packages: future, torch
Successfully installed future-0.18.2 torch-1.5.0
zhenghan@zhenghan:~/Software$
  • 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

写到最后:因为前几天我的Ubuntu19.04被我不小心搞崩了,开机后进入tty1界面,无法进入图形画界面,最后没得办法只能重新安装双系统,终于装好系统后,在安装显卡驱动的过程中,结果按照这篇博客https://jingyan.baidu.com/article/215817f738fe925fda1423a1.html,被坑的好惨。。。电脑直接进入黑屏界面,没办法,又重新装系统,装好了之后,之前配置的任何东西以及需要下载的软件都得重新来一遍,真心好累,且学且珍惜吧。。。。。。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/165490?site
推荐阅读
相关标签
  

闽ICP备14008679号