Pip3 安装 H5py 不适用于 Pyhton3,因为 H5py 可用于 Python2.7



我正在使用Ubuntu 16.04,并且安装了Python 2.7和Python 3.5。我想在两个版本中都使用h5py

但是,如果我输入

pip3 install h5py

它说

Requirement already satisfied: h5py in /home/veronika/.local/lib/python2.7/site-packages
Requirement already satisfied: six in /home/veronika/.local/lib/python2.7/site-packages (from h5py)
Requirement already satisfied: numpy>=1.7 in /home/veronika/.local/lib/python2.7/site-packages (from h5py)

而在 Python 3 中,它无法导入 h5py .

有什么想法可以解决这个问题吗?

试着告诉 pip 你想安装软件包的 Python 版本:前任。:python3 -m pip install h5py

最新更新