我尝试使用pywheels的以下链接安装它: Tensorflow bin 。
我为安装TensorFlow 1.14.0的步骤:注意:Debian 11上的Global Python是3.9.2
-
创建了一个虚拟环境,并将本地Python版本更改为3.7.6,使用我的本地文件夹中的Pyenv,称为“项目” 。
-
安装以下依赖项:
sudo apt-get install -y libhdf5-dev libc-ares-dev libeigen3-dev gcc gfortran libgfortran5 libatlas3-base libatlas-base-dev libopenblas-dev libopenblas-base libblas-dev liblapack-dev cython3 libatlas-base-dev OpenMpi-bin libopenmpi-dev python3-dev build-essential cmake pkg-config libjpeg-dev libtiff5-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libfontconfig1-dev libcairo2-dev libgdk-pixbuf2.0-dev libpango1.0-dev libgtk2.0-dev libgtk-3-dev libhdf5-serial-dev libhdf5-103 libqt5gui5 libqt5webkit5 libqt5test5 libqt5test5 python3-python3-python3-pyqt5 pyqt5
-
Downloaded pywheel: download_tensorflow-1.14.0-cp37-cp37m-linux_aarch64.sh
-
使用CHMOD命令安装pywheel给出以下错误:
我已经尝试在PI4B的32bit OS上安装TensorFlow,但很成功,但是当我想导入TensorFlow进行测试时,它给出了以下错误:H5PY版本不匹配! - > ” noreflow noreferrer“>
关于OpenCV,我再也找不到如何在PI4中安装某个版本。我只能安装最新的使用: pip install opencv-contrib-python
== 4.4.0.44无法正常工作。
尝试大约两天后,我真的没有想法。我将非常感谢社区的任何帮助:)
I have tried installing it using the following link for pywheels: Tensorflow bins.
The steps that i took to install tensorflow 1.14.0: Note: global python on Debian 11 is 3.9.2
-
Created a virtual enviroment and changed the local python version to 3.7.6 using pyenv in my local folder called 'project'.
-
Installed following dependencies:
sudo apt-get install -y libhdf5-dev libc-ares-dev libeigen3-dev gcc gfortran libgfortran5 libatlas3-base libatlas-base-dev libopenblas-dev libopenblas-base libblas-dev liblapack-dev cython3 libatlas-base-dev openmpi-bin libopenmpi-dev python3-dev build-essential cmake pkg-config libjpeg-dev libtiff5-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libfontconfig1-dev libcairo2-dev libgdk-pixbuf2.0-dev libpango1.0-dev libgtk2.0-dev libgtk-3-dev libhdf5-serial-dev libhdf5-103 libqt5gui5 libqt5webkit5 libqt5test5 python3-pyqt5
-
Downloaded pywheel: download_tensorflow-1.14.0-cp37-cp37m-linux_aarch64.sh
-
Installing the pywheel using chmod command gave the following error:

I already tried to install Tensorflow it on 32bit OS for Pi4B and was successfull but when i wanted to import tensorflow to test it, it gave the following error: h5py versions dont match!->
Regarding opencv, again i couldn't find how i can install a certain version in pi4. I could only install the latest using: pip install opencv-contrib-python
==4.4.0.44 wouldn't work.
I really ran out of ideas after trying for about 2 days. I would be very thankful for any small bit of help from the community:)
发布评论
评论(1)
我认为问题是您正在尝试将其安装在虚拟环境中。尝试安装Python 3.7.6,然后遵循相同的步骤。
我认为您无法在Raspberry Pi上选择OpenCV的版本。它主要是向后兼容的,因此您无需过多担心。
I think the problem is that you are trying to install it in a virtual environment. Try installing python 3.7.6 and follow the same steps you did.
I don't think you can choose the version of OpenCV on raspberry pi. It is mostly backward compatible so you don't need to worry too much about it.