0
$\begingroup$

I am getting following error while I write:

pip3 install qiskit==0.22.0 

in the terminal.

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for qiskit-aer
  Building wheel for qiskit-terra (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for qiskit-terra (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [814 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-39
      creating build/lib.macosx-10.9-universal2-cpython-39/qiskit

. . .

 error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for qiskit-terra
Failed to build qiskit-aer qiskit-terra
ERROR: Could not build wheels for qiskit-terra, which is required to install pyproject.toml-based projects
$\endgroup$

1 Answer 1

4
$\begingroup$

I think you're trying to install qiskit-terra==0.22.0. The current version of qiskit-terra is 0.23.1, while the current version of the base qiskit package (that is trying to be installed from your command) is 0.41.0.

To install qiskit-terra 0.22.0 you want to pip install qiskit==0.39.0, see https://github.com/Qiskit/qiskit/releases/tag/0.39.0.

Base qiskit 0.22.0 dates back to Oct 5, 2020, which is likely to cause errors with python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.