无法在 Fedora 上安装 QISKIT

Unable to insall QISKIT on Fedora

我正在尝试在 Python3 上安装 QISKIT(按照他们 website) on my Fedora 28 system, but the following error is being thrown. I have tried to find a solution and tried everything that people have suggested here 上的说明。但问题仍然存在。

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/

对应该做什么有什么建议吗?由于 Whosebug 编辑器不允许,因此无法在此处 post 完整的错误跟踪。

查看 QISKIT 的 github 存储库,我发现其他人也有类似的问题。首先查看此处找到的回复 https://github.com/Qiskit/qiskit-tutorial/issues/254. They suggesting making usre you have psutil installed. I would start with this https://github.com/giampaolo/psutil/blob/master/INSTALL.rst。另外,就其价值而言,我看到 github 上的海报也在使用 Fedora。