赞
踩
pip install tensorflow-2.3.0-cp37-none-linux_armv7l.whl
没在所下载文件位置打开文件
Defaulting to user installation because normal site-packages is not
writeable WARNING: Requirement
‘tensorflow-2.3.0-cp37-none-linux_armv7l.whl’ looks like a filename,
but the file does not exist 这个是没有在在存放whl的文件夹下按F4(一般是放在Downloads下)
若正常
输入python3
import tensorflow as tf
查看,若没报错则安装成功
提示:pi@raspberrypi:~ $ pip install tensorflow-2.3.0-cp37-none-linux_armv7l.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. 好像是因为python2的影响
转: 树莓派删除Python2.7 默认Python3.7 - 简书
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: tensorflow-2.3.0-cp37-none-linux_armv7l.whl is not a supported wheel on this platform.
WARNING: You are using pip version 20.2.4; however, version 20.3.4 is available.
You should consider upgrading via the ‘/usr/bin/python -m pip install --upgrade pip’ command.这个要求更新pip
ModuleNotFoundError: No module named ‘pip._internal.cli.main‘报错,解决方法_tacity的博客-CSDN博客
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
2022/4/4 解决哈希值不匹配,将树莓派中的源,更换为国内镜像
一键换取清华源:
sudo sed -i 's#://mirrordirector.raspbian.org#s://mirrors.tuna.tsinghua.edu.cn/raspbian#g' /etc/apt/sources.list sudo sed -i 's#://archive.raspberrypi.org/debian#s://mirrors.tuna.tsinghua.edu.cn/raspberrypi#g' /etc/apt/sources.list.d/raspi.list
keras需要tensorflow作为后台。
先安装一些依赖包。
sudo apt-get install libhdf5-serial-dev
sudo pip install h5py
sudo apt-get install python-scipy
最后运行sudo pip install keras,安装keras:
sudo pip install keras
报错如下,代码运行时:
ValueError: numpy.ndarray size changed, may indicate binary
incompatibility. Expected 88 from C header, got 80 from PyObject
核心原因是 numpy 版本与当前一些库不匹配
通常是因为安装的 numpy 版本过低,把 numpy 更新到最新版本即可
pip install --upgrade numpy
如果出现:
CoreML: export failure: Unsupported numpy type: float32
此时原因是 numpy 版本当前冲突【切换正确版本即可】:
pip install numpy==1.19.5
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。