gpt4 book ai didi

Python 3.7.5-slim-strech,安装表和hdf5错误查找hdf install

转载 作者:太空宇宙 更新时间:2023-11-03 20:15:09 24 4
gpt4 key购买 nike

当前正在构建图像:

FROM python:3.7-slim-stretch

WORKDIR /root/forstack-host

COPY requirements.txt /root/requirements.txt

RUN apt-get update && apt-get install -y libgomp1 gcc
RUN apt-get install -y libpq-dev
RUN apt-get install net-tools
RUN apt-get install -y libhdf5-serial-dev hdf5-tools

RUN python3 -m pip install --no-cache-dir -U pip && \
python3 -m pip install --no-cache-dir -r /root/requirements.txt

安装tables=3.4.4时出现错误

ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-91revz2s/tables/setup.py'"'"'; __file__='"'"'/tmp/pip-install-91revz2s/tables/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-91revz2s/tables/pip-egg-info
cwd: /tmp/pip-install-91revz2s/tables/
Complete output (12 lines):
/tmp/H5close9pyniq85.c: In function ‘main’:
/tmp/H5close9pyniq85.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
H5close();
^~~~~~~
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
* Using Python 3.7.5 (default, Oct 19 2019, 00:03:48)
* USE_PKGCONFIG: True
.. 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.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

使用RUN apt-get install -y libhdf5-serial-dev hdf5-tools似乎无法修复此错误,而且我似乎无法设置HDF5_DIR 环境。是否有可用的 3.7 镜像可以修复此 hdf5 问题?

最佳答案

您可以在安装之前尝试将此 ARG 添加到您的 Dockerfile 中:

ARG HDF5_DIR=PATH_TO_YOUR_HDF5 # normally should be in /usr/local or /opt/local

您可能还需要安装build-dep

关于Python 3.7.5-slim-strech,安装表和hdf5错误查找hdf install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58496539/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com