Tensorflow安装失败解决

看失败是失败在了scipy上

pip3 install Cython

sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev libblas-dev

sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev libblas-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gfortran gfortran-6 libatlas-dev libatlas3-base libgfortran-6-dev libopenblas-base
Suggested packages:
  gfortran-doc gfortran-6-doc libgfortran3-dbg libcoarrays-dev libblas-doc liblapack-doc liblapack-doc-man
The following NEW packages will be installed:
  gfortran gfortran-6 libatlas-base-dev libatlas-dev libatlas3-base libblas-dev libgfortran-6-dev liblapack-dev libopenblas-base libopenblas-dev
0 upgraded, 10 newly installed, 0 to remove and 218 not upgraded.
Need to get 15.6 MB of archives.
After this operation, 82.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libgfortran-6-dev armhf 6.3.0-18+rpi1+deb9u1 [199 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf gfortran-6 armhf 6.3.0-18+rpi1+deb9u1 [5,421 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf gfortran armhf 4:6.3.0-4 [1,352 B]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libatlas3-base armhf 3.10.3-1+rpi1 [1,920 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libblas-dev armhf 3.7.0-2 [114 kB]                                
Get:6 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libatlas-dev armhf 3.10.3-1+rpi1 [65.9 kB]                        
Get:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libatlas-base-dev armhf 3.10.3-1+rpi1 [2,528 kB]                  
Get:8 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libopenblas-base armhf 0.2.19-3+rpi1 [1,978 kB]                   
Get:9 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf libopenblas-dev armhf 0.2.19-3+rpi1 [1,847 kB]                    
Get:10 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main armhf liblapack-dev armhf 3.7.0-2 [1,483 kB]                           
Fetched 15.6 MB in 16s (971 kB/s)                                                                                                                
Selecting previously unselected package libgfortran-6-dev:armhf.
(Reading database ... 104697 files and directories currently installed.)
Preparing to unpack .../0-libgfortran-6-dev_6.3.0-18+rpi1+deb9u1_armhf.deb ...
Unpacking libgfortran-6-dev:armhf (6.3.0-18+rpi1+deb9u1) ...
Selecting previously unselected package gfortran-6.
Preparing to unpack .../1-gfortran-6_6.3.0-18+rpi1+deb9u1_armhf.deb ...
Unpacking gfortran-6 (6.3.0-18+rpi1+deb9u1) ...
Selecting previously unselected package gfortran.
Preparing to unpack .../2-gfortran_4%3a6.3.0-4_armhf.deb ...
Unpacking gfortran (4:6.3.0-4) ...
Selecting previously unselected package libatlas3-base.
Preparing to unpack .../3-libatlas3-base_3.10.3-1+rpi1_armhf.deb ...
Unpacking libatlas3-base (3.10.3-1+rpi1) ...
Selecting previously unselected package libblas-dev.
Preparing to unpack .../4-libblas-dev_3.7.0-2_armhf.deb ...
Unpacking libblas-dev (3.7.0-2) ...
Selecting previously unselected package libatlas-dev.
Preparing to unpack .../5-libatlas-dev_3.10.3-1+rpi1_armhf.deb ...
Unpacking libatlas-dev (3.10.3-1+rpi1) ...
Selecting previously unselected package libatlas-base-dev.
Preparing to unpack .../6-libatlas-base-dev_3.10.3-1+rpi1_armhf.deb ...
Unpacking libatlas-base-dev (3.10.3-1+rpi1) ...
Selecting previously unselected package libopenblas-base.
Preparing to unpack .../7-libopenblas-base_0.2.19-3+rpi1_armhf.deb ...
Unpacking libopenblas-base (0.2.19-3+rpi1) ...
Selecting previously unselected package libopenblas-dev.
Preparing to unpack .../8-libopenblas-dev_0.2.19-3+rpi1_armhf.deb ...
Unpacking libopenblas-dev (0.2.19-3+rpi1) ...
Selecting previously unselected package liblapack-dev.
Preparing to unpack .../9-liblapack-dev_3.7.0-2_armhf.deb ...
Unpacking liblapack-dev (3.7.0-2) ...
Setting up libatlas3-base (3.10.3-1+rpi1) ...
update-alternatives: using /usr/lib/atlas-base/atlas/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode
update-alternatives: using /usr/lib/atlas-base/atlas/liblapack.so.3 to provide /usr/lib/liblapack.so.3 (liblapack.so.3) in auto mode
Setting up libgfortran-6-dev:armhf (6.3.0-18+rpi1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libopenblas-base (0.2.19-3+rpi1) ...
update-alternatives: using /usr/lib/openblas-base/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode
update-alternatives: using /usr/lib/openblas-base/liblapack.so.3 to provide /usr/lib/liblapack.so.3 (liblapack.so.3) in auto mode
Setting up gfortran-6 (6.3.0-18+rpi1+deb9u1) ...
Setting up gfortran (4:6.3.0-4) ...
update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode
update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode
Setting up libblas-dev (3.7.0-2) ...
update-alternatives: using /usr/lib/libblas/libblas.so to provide /usr/lib/libblas.so (libblas.so) in auto mode
Setting up libatlas-dev (3.10.3-1+rpi1) ...
Setting up libopenblas-dev (0.2.19-3+rpi1) ...
update-alternatives: using /usr/lib/openblas-base/libblas.so to provide /usr/lib/libblas.so (libblas.so) in auto mode
update-alternatives: using /usr/lib/openblas-base/liblapack.so to provide /usr/lib/liblapack.so (liblapack.so) in auto mode
Setting up liblapack-dev (3.7.0-2) ...
Setting up libatlas-base-dev (3.10.3-1+rpi1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
 

继续tensorflow安装过程:

 pip3 install tensorflow-2.3.0-cp35-none-linux_armv7l.whl --index-url https://pypi.douban.com/simple
pi@raspberrypi:~ $ pip3 install tensorflow-2.3.0-cp35-none-linux_armv7l.whl --index-url https://pypi.tuna.tsinghua.edu.cn/simple/
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/, https://www.piwheels.org/simple
Processing ./tensorflow-2.3.0-cp35-none-linux_armv7l.whl
Collecting absl-py>=0.7.0
  Using cached https://www.piwheels.org/simple/absl-py/absl_py-0.11.0-py3-none-any.whl (127 kB)
Collecting tensorboard<3,>=2.3.0
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/64/21/eebd23060763fedeefb78bc2b286e00fa1d8abda6f70efa2ee08c28af0d4/tensorboard-2.4.1-py3-none-any.whl (10.6 MB)
     |████████████████████████████████| 10.6 MB 128 kB/s 
Collecting keras-preprocessing<1.2,>=1.1.1
  Using cached https://www.piwheels.org/simple/keras-preprocessing/Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow==2.3.0) (0.29.0)
Collecting tensorflow-estimator<2.4.0,>=2.3.0
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e9/ed/5853ec0ae380cba4588eab1524e18ece1583b65f7ae0e97321f5ff9dfd60/tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
     |████████████████████████████████| 459 kB 91 kB/s 
Collecting numpy<1.19.0,>=1.16.0
  Using cached https://www.piwheels.org/simple/numpy/numpy-1.18.5-cp35-cp35m-linux_armv7l.whl (8.9 MB)
Collecting termcolor>=1.1.0
  Using cached https://www.piwheels.org/simple/termcolor/termcolor-1.1.0-py3-none-any.whl (4.8 kB)
Collecting gast==0.3.3
  Using cached https://www.piwheels.org/simple/gast/gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting opt-einsum>=2.3.2
  Using cached https://www.piwheels.org/simple/opt-einsum/opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting h5py<2.11.0,>=2.10.0
  Using cached https://www.piwheels.org/simple/h5py/h5py-2.10.0-cp35-cp35m-linux_armv7l.whl (3.5 MB)
Collecting wrapt>=1.11.1
  Using cached https://www.piwheels.org/simple/wrapt/wrapt-1.12.1-cp35-cp35m-linux_armv7l.whl (66 kB)
Collecting astunparse==1.6.3
  Using cached https://www.piwheels.org/simple/astunparse/astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting protobuf>=3.9.2
  Using cached https://www.piwheels.org/simple/protobuf/protobuf-3.14.0-py2.py3-none-any.whl (173 kB)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow==2.3.0) (1.12.0)
Collecting grpcio>=1.8.6
  Using cached https://www.piwheels.org/simple/grpcio/grpcio-1.35.0-cp35-cp35m-linux_armv7l.whl (32.0 MB)
Collecting google-pasta>=0.1.8
  Using cached https://www.piwheels.org/simple/google-pasta/google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting scipy==1.4.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260/scipy-1.4.1.tar.gz (24.6 MB)
     |████████████████████████████████| 24.6 MB 26 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: werkzeug>=0.11.15 in /usr/lib/python3/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.11.15)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached https://www.piwheels.org/simple/google-auth-oauthlib/google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Collecting markdown>=2.6.8
  Using cached https://www.piwheels.org/simple/markdown/Markdown-3.2.2-py3-none-any.whl (88 kB)
Collecting tensorboard-plugin-wit>=1.6.0
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1a/c1/499e600ba0c618b451cd9c425ae1c177249940a2086316552fee7d86c954/tensorboard_plugin_wit-1.8.0-py3-none-any.whl (781 kB)
     |████████████████████████████████| 781 kB 4.3 MB/s 
Collecting google-auth<2,>=1.6.3
  Using cached https://www.piwheels.org/simple/google-auth/google_auth-1.23.0-py2.py3-none-any.whl (114 kB)
Collecting setuptools>=41.0.0
  Using cached https://www.piwheels.org/simple/setuptools/setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting requests<3,>=2.21.0
  Using cached https://www.piwheels.org/simple/requests/requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached https://www.piwheels.org/simple/pyasn1-modules/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting cachetools<5.0,>=2.0.0
  Using cached https://www.piwheels.org/simple/cachetools/cachetools-4.2.1-py3-none-any.whl (12 kB)
Collecting rsa<5,>=3.1.4
  Using cached https://www.piwheels.org/simple/rsa/rsa-4.7-py3-none-any.whl (34 kB)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/lib/python3/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.7.0)
Collecting importlib-metadata
  Using cached https://www.piwheels.org/simple/importlib-metadata/importlib_metadata-2.1.1-py2.py3-none-any.whl (10 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Using cached https://www.piwheels.org/simple/pyasn1/pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached https://www.piwheels.org/simple/urllib3/urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting certifi>=2017.4.17
  Using cached https://www.piwheels.org/simple/certifi/certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting idna<3,>=2.5
  Using cached https://www.piwheels.org/simple/idna/idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting chardet<5,>=3.0.2
  Using cached https://www.piwheels.org/simple/chardet/chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting zipp>=0.5
  Using cached https://www.piwheels.org/simple/zipp/zipp-1.2.0-py2.py3-none-any.whl (4.8 kB)
Building wheels for collected packages: scipy
  Building wheel for scipy (PEP 517) ... done
  Created wheel for scipy: filename=scipy-1.4.1-cp35-cp35m-linux_armv7l.whl size=40953140 sha256=12cfe059e72fc1fe9f94fb91f14967d7bc939e7581ba59137b101c20c06d4b5c
  Stored in directory: /home/pi/.cache/pip/wheels/2d/6f/3c/a434468bc1519925e359db1c378a9f519661d3d6b9a4c1819c
Successfully built scipy
Installing collected packages: pyasn1, zipp, setuptools, rsa, pyasn1-modules, cachetools, urllib3, importlib-metadata, idna, google-auth, chardet, certifi, tensorboard-plugin-wit, requests, protobuf, numpy, markdown, grpcio, google-auth-oauthlib, absl-py, wrapt, termcolor, tensorflow-estimator, tensorboard, scipy, opt-einsum, keras-preprocessing, h5py, google-pasta, gast, astunparse, tensorflow
  WARNING: The scripts easy_install and easy_install-3.5 are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pyrsa-decrypt, pyrsa-encrypt, pyrsa-keygen, pyrsa-priv2pub, pyrsa-sign and pyrsa-verify are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script chardetect is installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts f2py, f2py3 and f2py3.5 are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script markdown_py is installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script google-oauthlib-tool is installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script tensorboard is installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts estimator_ckpt_converter, saved_model_cli, tensorboard, tf_upgrade_v2, tflite_convert, toco and toco_from_protos are installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed absl-py-0.11.0 astunparse-1.6.3 cachetools-4.2.1 certifi-2020.12.5 chardet-4.0.0 gast-0.3.3 google-auth-1.23.0 google-auth-oauthlib-0.4.1 google-pasta-0.2.0 grpcio-1.35.0 h5py-2.10.0 idna-2.10 importlib-metadata-2.1.1 keras-preprocessing-1.1.2 markdown-3.2.2 numpy-1.18.5 opt-einsum-3.3.0 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.25.1 rsa-4.7 scipy-1.4.1 setuptools-50.3.2 tensorboard-2.4.1 tensorboard-plugin-wit-1.8.0 tensorflow-2.3.0 tensorflow-estimator-2.3.0 termcolor-1.1.0 urllib3-1.26.3 wrapt-1.12.1 zipp-1.2.0
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值