我正在尝试在我的 Fedora 28 系统上的 Python3 上安装 QISKIT(按照他们网站上的说明),但出现以下错误。我试图找到一个解决方案,并尝试了人们在这里提出的所有建议。但问题仍然存在。
pip3 install qiskit --user
Collecting qiskit
Using cached https://files.pythonhosted.org/packages/b0/83/5aee99f9e958700ca1c4af2c5509b9bf0f012796d4aca5df680e6e7e827c/qiskit-0.6.1-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.6/site-packages (from qiskit)
Requirement already satisfied: IBMQuantumExperience>=2.0.3 in /root/.local/lib/python3.6/site-packages (from qiskit)
Requirement already satisfied: pillow>=4.2.1 in /usr/lib64/python3.6/site-packages (from qiskit)
. . . .
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=548 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psutil
Running setup.py clean for psutil
. . . .
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-euta5w0j/psutil/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-49bs3guc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-euta5w0j/psutil/
关于应该做什么的任何建议?由于 Stackoverflow 编辑器不允许,因此无法在此处发布完整的错误跟踪。