我应该采取什么步骤来解决使用pip安装h5py的问题?

问题描述 投票:0回答:1

我在 Debian 12 上尝试使用 pip 安装软件包时遇到问题,我不确定如何解决它。作为说明,以下是我尝试安装

h5py
和其他软件包时发生的情况:

pip install h5py

Defaulting to user installation because normal site-packages is not writeable
DEPRECATION: Loading egg at /usr/local/lib/python3.11/dist-packages/PyPDF3-1.0.6-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
Requirement already satisfied: h5py in /home/merix/.local/lib/python3.11/site-packages (3.12.1)
Requirement already satisfied: numpy>=1.19.3 in /usr/lib/python3/dist-packages (from h5py) (1.24.2)
WARNING: Error parsing dependencies of send2trash: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
    sys-platform (=="darwin") ; extra == 'objc'

我尝试仍然通过命令安装软件包:

git clone "https://github.com/h5py/h5py.git"
cd h5py
pip install .

但是,此修复仅对 h5py 之外的软件包有效。

如果有关于安装

h5py
和其他软件包的建议,我将不胜感激。

python pip debian h5py
1个回答
0
投票

这对我有用。我正在使用 Debian 12、Bookworm 和 Raspberry Pi 5。

supra@supra:~ $ sudo apt install python3-h5py

正在阅读包裹清单... 完成构建依赖树...完成读取状态信息... 完成 以下软件包已自动安装,并且没有 需要更长的时间: chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra linux-headers-6.6.31+rpt-common-rpi
linux-headers-6.6.31+rpt-rpi-2712 linux-headers-6.6.31+rpt-rpi-v8 linux-image-6.6.31+rpt-rpi-2712 linux-image-6.6.31+rpt-rpi-v8 linux-kbuild-6.6.31+rpt 使用“sudo apt autoremove”删除它们。这 将安装以下附加软件包:liblzf1 python3-h5py-serial 建议的软件包:python-h5py-doc 将安装以下新软件包:liblzf1 python3-h5py python3-h5py-serial 0 个升级,3 个新安装,0 个删除和 0 个 没有升级。

试试这个:

sudo apt install python3-h5py
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.