Closed galih56 closed 3 years ago
Please give some information as to how to reproduce this problem
This looks like a build problem with Aer. Maybe migrate this issue to the Aer repository, and/or try the discussion going on over here.
I recommend using "pip install ninja-build" That should do it. If not let me know.
If the above does not work, I recommend checking your version of Python and using a virtual environment if you're not already. Aer is known to have issues with installing on Windows devices if a 32-bit version of Python is used. Qiskit is built to install with wheels only included in the 64-bit version, and it attempts to install with other C compilers otherwise.
That said, I had success installing Aer using Python 3.7.0 and Anaconda 64-bit on a Windows 10 device.
I got a similar error when installing from WSL Ubuntu 20.04 and Python 3.9. Downgrading to Python 3.8 solved it for me, aer went through without problem.
ERROR: Command errored out with exit status 1:
command: /home/roemerco/miniconda3/envs/qiskit/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ggwv8x03/qiskit-aer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ggwv8x03/qiskit-aer/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-record-exjf6aj2/install-record.txt --single-version-externally-managed --compile --install-headers /home/roemerco/miniconda3/envs/qiskit/include/python3.9/qiskit-aer
cwd: /tmp/pip-install-ggwv8x03/qiskit-aer/
Complete output (198 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-ggwv8x03/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Unix Makefiles" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-ggwv8x03/qiskit-aer/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Unix Makefiles" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build
Command:
/tmp/pip-install-ggwv8x03/qiskit-aer/.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/bin/cmake /tmp/pip-install-ggwv8x03/qiskit-aer -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/roemerco/miniconda3/envs/qiskit/bin/python -DPYTHON_VERSION_STRING:STRING=3.9.0 -DPYTHON_INCLUDE_DIR:PATH=/home/roemerco/miniconda3/envs/qiskit/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/home/roemerco/miniconda3/envs/qiskit/lib/libpython3.9.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/roemerco/miniconda3/envs/qiskit/lib/python3.9/site-packages/skbuild/resources/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Performing Test flag_supported
-- Performing Test flag_supported - Success
-- Conan: Installing config from /tmp/pip-install-ggwv8x03/qiskit-aer/conan_settings
ERROR: Unable to deduce type config install: /tmp/pip-install-ggwv8x03/qiskit-aer/conan_settings
-- Conan: Automatic detection of conan settings from cmake
-- Conan: Settings= -s;build_type=Release;-s;compiler=gcc;-s;compiler.version=9;-s;compiler.libcxx=libstdc++11
-- Conan: checking conan executable
-- Conan: Found program /home/roemerco/miniconda3/envs/qiskit/bin/conan
-- Conan: Version found Conan version 1.31.2
-- Conan executing: /home/roemerco/miniconda3/envs/qiskit/bin/conan install . -s build_type=Release -s compiler=gcc -s compiler.version=9 -s compiler.libcxx=libstdc++11 -e=CONAN_CMAKE_PROGRAM=/tmp/pip-install-ggwv8x03/qiskit-aer/.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/bin/cmake -g=cmake --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
CONAN_CMAKE_PROGRAM=/tmp/pip-install-ggwv8x03/qiskit-aer/.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/bin/cmake
conanfile.txt: Installing package
Requirements
fmt/6.2.1 from 'conan-center' - Cache
muparserx/4.0.8 from 'conan-center' - Cache
nlohmann_json/3.1.1 from 'conan-center' - Cache
spdlog/1.5.0 from 'conan-center' - Cache
Packages
fmt/6.2.1:b911f48570f9bb2902d9e83b2b9ebf9d376c8c56 - Cache
muparserx/4.0.8:b911f48570f9bb2902d9e83b2b9ebf9d376c8c56 - Cache
nlohmann_json/3.1.1:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
spdlog/1.5.0:942d5c94aa934511ee4500bda27908cb4e791b24 - Cache
Installing (downloading, building) binaries...
fmt/6.2.1: Already installed!
muparserx/4.0.8: Already installed!
nlohmann_json/3.1.1: Already installed!
spdlog/1.5.0: Already installed!
conanfile.txt: Generator cmake created conanbuildinfo.cmake
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
-- Conan: Loading conanbuildinfo.cmake
-- Conan: Adjusting output directories
-- Conan: Using cmake targets configuration
-- Library spdlog found /home/roemerco/.conan/data/spdlog/1.5.0/_/_/package/942d5c94aa934511ee4500bda27908cb4e791b24/lib/libspdlog.a
-- Library muparserx found /home/roemerco/.conan/data/muparserx/4.0.8/_/_/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libmuparserx.a
-- Library fmt found /home/roemerco/.conan/data/fmt/6.2.1/_/_/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libfmt.a
-- Conan: Adjusting language standard
-- Current conanbuildinfo.cmake directory: /tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build
-- Conan: Compiler GCC>=5, checking major version 9
-- Conan: Checking correct version: 9
-- Looking for OpenMP support...
-- OpenMP found!
-- OpenMP_CXX_FLAGS = -fopenmp
-- OpenMP_EXE_LINKER_FLAGS =
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for OpenBLAS library...
-- OpenBLAS not found. Looking for any other BLAS & Lapack libraries...
-- Looking for sgemm_
-- Looking for sgemm_ - not found
CMake Error at .eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/share/cmake-3.18/Modules/FindBLAS.cmake:947 (find_package_handle_standard_args)
CMakeLists.txt:209 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "/home/roemerco/miniconda3/envs/qiskit/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 582, in setup
env = cmkr.configure(cmake_args,
File "/home/roemerco/miniconda3/envs/qiskit/lib/python3.9/site-packages/skbuild/cmaker.py", line 229, in configure
raise SKBuildError(
An error occurred while configuring with CMake.
Command:
/tmp/pip-install-ggwv8x03/qiskit-aer/.eggs/cmake-3.18.4.post1-py3.9-linux-x86_64.egg/cmake/data/bin/cmake /tmp/pip-install-ggwv8x03/qiskit-aer -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/roemerco/miniconda3/envs/qiskit/bin/python -DPYTHON_VERSION_STRING:STRING=3.9.0 -DPYTHON_INCLUDE_DIR:PATH=/home/roemerco/miniconda3/envs/qiskit/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/home/roemerco/miniconda3/envs/qiskit/lib/libpython3.9.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/roemerco/miniconda3/envs/qiskit/lib/python3.9/site-packages/skbuild/resources/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
/tmp/pip-install-ggwv8x03/qiskit-aer
Working directory:
/tmp/pip-install-ggwv8x03/qiskit-aer/_skbuild/linux-x86_64-3.9/cmake-build
Please see CMake's output for more information.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/roemerco/miniconda3/envs/qiskit/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ggwv8x03/qiskit-aer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ggwv8x03/qiskit-aer/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-record-exjf6aj2/install-record.txt --single-version-externally-managed --compile --install-headers /home/roemerco/miniconda3/envs/qiskit/include/python3.9/qiskit-aer Check the logs for full command output.
Thanks @corneliusroemer
I was just downgrade python to latest 3.8 version using this anaconda command:
conda install python=3.8.5
I had the same problem on Ubuntu 18.04.
Thank you very much for the tip. Downgrading to Python 3.8.5 worked for me as well.
Closing as solved.
I couldn't install qiskit library in my computer
I have
Thrown error message from CMD