我有:
sudo pip install --upgrade tables我得到了:
/usr/bin/ld: cannot find -lhdf5
collect2: ld returned 1 exit status
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
Complete output from command python setup.py egg_info:
/usr/bin/ld: cannot find -lhdf5但是:
$ echo $HDF5_DIR
/opt/hdf5/
$ ls /opt/hdf5/
bin include lib share
$ ls /opt/hdf5/lib/
libhdf5.a libhdf5_hl.la libhdf5_hl.so.8 libhdf5.la libhdf5.so libhdf5.so.8.0.1
libhdf5_hl.a libhdf5_hl.so libhdf5_hl.so.8.0.1 libhdf5.settings libhdf5.so.8怎么了?如何调试?我已经尝试将HDF5_DIR设置为/opt/或/opt/hdf5/lib。
发布于 2014-11-14 09:07:18
我在Debian sid上尝试在本地的virtualenv中工作时也遇到了同样的错误。为了解决这个问题,我做到了:
apt-get build-dep python-tables
HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ && pip install tables..。现在它起作用了。
发布于 2016-04-01 21:53:02
我可以使用以下代码在OSX的虚拟环境中轻松解决这个问题:
$ brew install hdf5
$ pyvenv test
$ workon myvenv # to get pytables working within the virtual environment myvenv
$ pip install numpy numexpr cython
$ pip install tables(摘自https://github.com/PyTables/PyTables/issues/385上的andreabedini帖子)
发布于 2014-10-07 12:50:30
我也遇到了类似的问题,但我使用的是领先优势,而不是pip版本(见下文)。我还尝试指向这个库本身。
export HDF5_DIR=/usr/lib/libhdf5.so.6但它并没有起作用。
旁白:如果你认为你的bug最近可能已经被解决了,你可以尝试PyTables的前沿:
sudo pip install git+https://github.com/PyTables/PyTables。
构建(这是由pip install引起的)在我安装了hdf5库的开发版本(libhdf5-openmpi- dev )之后,似乎进展得更快了。由于其他原因,构建仍然失败,但这是您可以尝试的另一个方向。
https://stackoverflow.com/questions/21607974
复制相似问题