[Python] Issue while installing qiskit-aer

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    I tried installing qiskit aer following instructions on their website (https://qiskit.org/ecosystem/aer/getting_started.html) and I keep getting this output. Does anyone know what's wrong?

    C:\Users\panag\qiskit-aer>pip install .
    Processing c:\users\panag\qiskit-aer
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Requirement already satisfied: qiskit>=0.45.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-aer==0.14.0) (0.45.1)
    Requirement already satisfied: numpy>=1.16.3 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-aer==0.14.0) (1.26.2)
    Requirement already satisfied: scipy>=1.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-aer==0.14.0) (1.11.4)
    Requirement already satisfied: psutil>=5 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-aer==0.14.0) (5.9.6)
    Requirement already satisfied: qiskit-terra==0.45.1 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit>=0.45.0->qiskit-aer==0.14.0) (0.45.1)
    Requirement already satisfied: rustworkx>=0.13.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (0.13.2)
    Requirement already satisfied: ply>=3.10 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (3.11)
    Requirement already satisfied: sympy>=1.3 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (1.12)
    Requirement already satisfied: dill>=0.3 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (0.3.7)
    Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (2.8.2)
    Requirement already satisfied: stevedore>=3.0.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (5.1.0)
    Requirement already satisfied: six>=1.5 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from python-dateutil>=2.8.0->qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (1.16.0)
    Requirement already satisfied: pbr!=2.1.0,>=2.0.0 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from stevedore>=3.0.0->qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (6.0.0)
    Requirement already satisfied: mpmath>=0.19 in c:\users\panag\appdata\local\programs\python\python312\lib\site-packages (from sympy>=1.3->qiskit-terra==0.45.1->qiskit>=0.45.0->qiskit-aer==0.14.0) (1.3.0)
    Building wheels for collected packages: qiskit-aer
    Building wheel for qiskit-aer (pyproject.toml) ... error
    error: subprocess-exited-with-error

    × Building wheel for qiskit-aer (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [89 lines of output]


    --------------------------------------------------------------------------------
    -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


    -- The C compiler identification is MSVC 19.38.33133.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx86/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is MSVC 19.38.33133.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx86/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done (4.3s)
    -- Generating done (0.0s)
    -- Build files have been written to: C:/Users/panag/qiskit-aer/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator - success
    --------------------------------------------------------------------------------

    Configuring Project
    Working directory:
    C:\Users\panag\qiskit-aer\_skbuild\win-amd64-3.12\cmake-build
    Command:
    'C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\panag\qiskit-aer' -G Ninja '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\ninja\data\bin\ninja' -D_SKBUILD_FORCE_MSVC=1930 --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:pATH=C:\Users\panag\qiskit-aer\_skbuild\win-amd64-3.12\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.12.1 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPYTHON_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPYTHON_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPython_ROOT_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPython_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython_NumPy_INCLUDE_DIRS:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\numpy\core\include' '-DPython3_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPython3_ROOT_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPython3_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython3_NumPy_INCLUDE_DIRS:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\numpy\core\include' '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\ninja\data\bin\ninja' -DCMAKE_BUILD_TYPE:STRING=Release

    Not searching for unused variables given on the command line.
    -- Performing Test flag_supported
    -- Performing Test flag_supported - Success
    -- Performing Test flag_supported
    -- Performing Test flag_supported - Success
    -- Conan: Automatic detection of conan settings from cmake
    -- Conan: Detected VS runtime: MD
    -- Conan: Settings= -s;arch=x86_64;-s;build_type=Release;-s;compiler=Visual Studio;-s;compiler.version=17;-s;compiler.runtime=MD
    -- Conan: checking conan executable
    -- Conan: Found program C:/Users/panag/AppData/Local/Temp/pip-build-env-4kstthax/overlay/Scripts/conan.exe
    -- Conan: Version found
    -- Conan executing: C:/Users/panag/AppData/Local/Temp/pip-build-env-4kstthax/overlay/Scripts/conan.exe install . -s arch=x86_64 -s build_type=Release -s compiler=Visual Studio -s compiler.version=17 -s compiler.runtime=MD -e=CONAN_CMAKE_PROGRAM=C:/Users/panag/AppData/Local/Temp/pip-build-env-96tnghlh/overlay/Lib/site-packages/cmake/data/bin/cmake.exe -g=cmake --build=missing
    CMake Error at cmake/conan.cmake:404 (message):
    Conan install failed='no such file or directory'
    Call Stack (most recent call first):
    cmake/conan.cmake:499 (conan_cmake_install)
    cmake/conan_utils.cmake:71 (conan_cmake_run)
    cmake/dependency_utils.cmake:20 (setup_conan)
    CMakeLists.txt:181 (setup_dependencies)


    -- Configuring incomplete, errors occurred!
    Traceback (most recent call last):
    File "C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\skbuild\setuptools_wrap.py", line 666, in setup
    env = cmkr.configure(
    ^^^^^^^^^^^^^^^
    File "C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\skbuild\cmaker.py", line 357, in configure
    raise SKBuildError(msg)

    An error occurred while configuring with CMake.
    Command:
    'C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\panag\qiskit-aer' -G Ninja '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\ninja\data\bin\ninja' -D_SKBUILD_FORCE_MSVC=1930 --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:pATH=C:\Users\panag\qiskit-aer\_skbuild\win-amd64-3.12\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.12.1 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPYTHON_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPYTHON_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPython_ROOT_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPython_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython_NumPy_INCLUDE_DIRS:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\numpy\core\include' '-DPython3_EXECUTABLE:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\python.exe' '-DPython3_ROOT_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\Include' '-DPython3_LIBRARY:pATH=C:\Users\panag\AppData\Local\Programs\Python\Python312\libs\python312.lib' '-DPython3_NumPy_INCLUDE_DIRS:pATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\numpy\core\include' '-DCMAKE_MAKE_PROGRAM:FILEPATH=C:\Users\panag\AppData\Local\Temp\pip-build-env-96tnghlh\overlay\Lib\site-packages\ninja\data\bin\ninja' -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
    C:\Users\panag\qiskit-aer
    Working directory:
    C:\Users\panag\qiskit-aer\_skbuild\win-amd64-3.12\cmake-build
    Please see CMake's output for more information.

    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for qiskit-aer
    Failed to build qiskit-aer
    ERROR: Could not build wheels for qiskit-aer, which is required to install pyproject.toml-based projects


    I tried reinstalling python and the qiskit modules and nothing works. What should I do?

    Continue reading...

Compartilhe esta Página