gpt4 book ai didi

python-3.x - 使用python 3.6安装自定义构建tensorflow 1.12车轮时出错

转载 作者:行者123 更新时间:2023-12-02 04:27:10 25 4
gpt4 key购买 nike

我正在尝试在ppc64le上安装自定义tensorflow 1.12轮
装有NVIDIA Pascal V100的IBM Power9系统,但出现以下错误:

gcc -pthread -B /ccs/home/shubhankar/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DH5_USE_16_API -I./h5py -I/tmp/pip-install-d__8pdpg/h5py/lzf -I/opt/local/include -I/usr/local/include -I/ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include -I/ccs/home/shubhankar/miniconda3/include/python3.6m -c /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c -o build/temp.linux-ppc64le-3.6/tmp/pip-install-d__8pdpg/h5py/h5py/defs.o
In file included from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-install-d__8pdpg/h5py/h5py/api_compat.h:26,
from /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c:657:
/ccs/home/shubhankar/miniconda3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
In file included from /tmp/pip-install-d__8pdpg/h5py/h5py/defs.c:657:0:
/tmp/pip-install-d__8pdpg/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Rolling back uninstall of h5py
Command "/ccs/home/shubhankar/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-d__8pdpg/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5_3ofwib/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-d__8pdpg/h5py/

由于某种原因,它在安装h5py时中断。所有这些均以警告消息开头。我不确定是否与此有关。
Cythonizing /tmp/pip-install-d__8pdpg/h5py/h5py/h5z.pyx
/tmp/pip-install-d__8pdpg/h5py/.eggs/Cython-0.29.1-py3.6-linux-ppc64le.egg/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-d__8pdpg/h5py/h5py/h5z.pxd

最后
Rolling back uninstall of h5py
Command "/ccs/home/shubhankar/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-d__8pdpg/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5_3ofwib/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-d__8pdpg/h5py/

我正在使用miniconda3进行程序包管理。系统安装的gcc版本是4.8.5

最佳答案

您将tensorflow安装在非标准体系结构(没有预编译的轮子at PyPI)上,因此pip必须从源代码编译所有内容(包括依赖项,包括h5py)。

要从源代码编译h5py,您需要安装HDF5 1.8.4或更高版本的以及开发 header 。有关详细信息,请参见http://docs.h5py.org/en/stable/build.html#source-installation

如果软件包可用,请使用操作系统的软件包管理器安装libhdf5-dev。或install HDF5 from sources

关于python-3.x - 使用python 3.6安装自定义构建tensorflow 1.12车轮时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53474533/

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