Невозможно вызвать QISKIT на Fedora - PullRequest
0 голосов
/ 04 декабря 2018

Я пытаюсь установить QISKIT на Python3 (следуя инструкции на их веб-сайте ) в моей системе Fedora 28, но появляется следующая ошибка.Я попытался найти решение и попробовал все, что люди предложили здесь .Но проблема сохраняется.

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 не позволяет.

1 Ответ

0 голосов
/ 04 декабря 2018

Глядя на репозиторий github для QISKIT, я обнаружил, что у других были похожие проблемы.Начните с просмотра ответов, найденных здесь https://github.com/Qiskit/qiskit-tutorial/issues/254. Они предлагают сделать так, чтобы у вас был установлен psutil.Я бы начал с этого https://github.com/giampaolo/psutil/blob/master/INSTALL.rst. Кроме того, для чего это стоит, я вижу, что плакат на github также использовал Fedora.

...