有没有办法在Raspberry Pi 4 64位Debian 11中安装Python 3.7的TensorFlow 1.14.0和OpenCV-4.4.0?

发布于 2025-02-12 07:38:45 字数 2093 浏览 0 评论 0 原文

我尝试使用pywheels的以下链接安装它: Tensorflow bin 。 我为安装TensorFlow 1.14.0的步骤:注意:Debian 11上的Global Python是3.9.2

  1. 创建了一个虚拟环境,并将本地Python版本更改为3.7.6,使用我的本地文件夹中的Pyenv,称为“项目” 。

  2. 安装以下依赖项:

    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

  3. Downloaded pywheel: download_tensorflow-1.14.0-cp37-cp37m-linux_aarch64.sh

  4. 使用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

  1. Created a virtual enviroment and changed the local python version to 3.7.6 using pyenv in my local folder called 'project'.

  2. 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

  3. Downloaded pywheel: download_tensorflow-1.14.0-cp37-cp37m-linux_aarch64.sh

  4. Installing the pywheel using chmod command gave the following error:
    enter image description here

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!->enter image description here

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:)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆离笙 2025-02-19 07:38:45

我认为问题是您正在尝试将其安装在虚拟环境中。尝试安装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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文