Closed willzeng closed 1 day ago
I wonder if this has something to do with the way in which you've installed poetry on your system and/or due to the version of poetry you might be using which is older.
For instance, you would want to install poetry on your device (not via brew
), but using pipx
as described here:
https://python-poetry.org/docs/
pipx install poetry
If you don't have pipx
on your system, then you would run:
brew install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions with --global argument
I reinstalled poetry using:
will@MacBook-Pro-66 metriq-gym % pipx install poetry --force
Installing to existing venv 'poetry'
⚠️ Note: poetry was already on your PATH at /usr/local/bin/poetry
installed package poetry 1.8.4, installed using Python 3.13.0
These apps are now globally available
- poetry
done! ✨ 🌟 ✨
But still get pretty much the same error
will@MacBook-Pro-66 metriq-gym % poetry install
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing qiskit-aer (0.15.1): Failed
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
--------------------------------------------------------------------------------
-- Trying 'Ninja' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 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.
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (1.8s)
-- Generating done (0.0s)
-- Build files have been written to: /private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Ninja' generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1/_skbuild/macosx-14.0-x86_64-3.13/cmake-build
Command:
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/cmake/data/bin/cmake /private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1/_skbuild/macosx-14.0-x86_64-3.13/cmake-install -DPYTHON_VERSION_STRING:STRING=3.13.0 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DPYTHON_LIBRARY:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib -DPython_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPython_ROOT_DIR:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DPython3_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPython3_ROOT_DIR:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/ninja/data/bin/ninja -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=14.0 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DCMAKE_BUILD_TYPE:STRING=Release
CMake Deprecation Warning at CMakeLists.txt:11 (cmake_minimum_required):
Compatibility with CMake < 3.10 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.
Not searching for unused variables given on the command line.
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/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: Automatic detection of conan settings from cmake
<stdin>:1:10: fatal error: 'string' file not found
1 | #include <string>
| ^~~~~~~~
1 error generated.
-- Conan: Settings= -s;build_type=Release;-s;compiler=apple-clang;-s;compiler.version=16.0;-s;compiler.libcxx=libc++
-- Conan: checking conan executable
-- Conan: Found program /var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/conan
-- Conan: Version found /private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/patch_ng.py:427: SyntaxWarning: invalid escape sequence '\d'
re_hunk_start = re.compile(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@")
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/patch_ng.py:578: SyntaxWarning: invalid escape sequence '\s'
re_filename_date_time = b"^--- ([^\t]+)(?:\s([0-9-]+)\s([0-9:]+)|.*)"
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/patch_ng.py:621: SyntaxWarning: invalid escape sequence '\+'
re_filename_date_time = b"^\+\+\+ ([^\t]+)(?:\s([0-9-]+)\s([0-9:]+)|.*)"
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/patch_ng.py:653: SyntaxWarning: invalid escape sequence '\d'
match = re.match(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@(.*)", line)
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/conans/model/ref.py:96: SyntaxWarning: invalid escape sequence '\+'
_validation_pattern = re.compile("^[a-zA-Z0-9_][a-zA-Z0-9_\+\.-]{%s,%s}$"
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/conans/assets/templates/search_table_html.py:1: SyntaxWarning: invalid escape sequence '\s'
content = """
Conan version 1.65.0
-- Conan executing: /var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/conan install . -s build_type=Release -s compiler=apple-clang -s compiler.version=16.0 -s compiler.libcxx=libc++ -e=CONAN_CMAKE_PROGRAM=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/cmake/data/bin/cmake -g=cmake --build=missing
WARN: **************************************************
WARN: *** Conan 1 is legacy and on a deprecation path **
WARN: *********** Please upgrade to Conan 2 ************
WARN: **************************************************
ERROR: Invalid setting '16.0' is not a valid 'settings.compiler.version' value.
Possible values are ['5.0', '5.1', '6.0', '6.1', '7.0', '7.3', '8.0', '8.1', '9.0', '9.1', '10.0', '11.0', '12.0', '13', '13.0', '13.1', '14', '14.0', '15', '15.0']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"
CMake Error at cmake/conan.cmake:404 (message):
Conan install failed='1'
Call Stack (most recent call first):
cmake/conan.cmake:499 (conan_cmake_install)
cmake/conan_utils.cmake:63 (conan_cmake_run)
cmake/dependency_utils.cmake:20 (setup_conan)
CMakeLists.txt:179 (setup_dependencies)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/skbuild/setuptools_wrap.py", line 660, in setup
env = cmkr.configure(
cmake_args,
...<3 lines>...
languages=cmake_languages,
)
File "/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/skbuild/cmaker.py", line 354, in configure
raise SKBuildError(msg)
An error occurred while configuring with CMake.
Command:
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/cmake/data/bin/cmake /private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1/_skbuild/macosx-14.0-x86_64-3.13/cmake-install -DPYTHON_VERSION_STRING:STRING=3.13.0 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DPYTHON_LIBRARY:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib -DPython_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPython_ROOT_DIR:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DPython3_EXECUTABLE:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/bin/python -DPython3_ROOT_DIR:PATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmprk8kz485/.venv/lib/python3.13/site-packages/ninja/data/bin/ninja -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=14.0 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1
Working directory:
/private/var/folders/mn/b5nskstn4l5bkjkk8gxtd9y40000gn/T/tmpfg5leeeb/qiskit-aer-0.15.1/_skbuild/macosx-14.0-x86_64-3.13/cmake-build
Please see CMake's output for more information.
at /usr/local/Cellar/poetry/1.8.4/libexec/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
160│
161│ error = ChefBuildError("\n\n".join(message_parts))
162│
163│ if error is not None:
→ 164│ raise error from None
165│
166│ return path
167│
168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with qiskit-aer (0.15.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "qiskit-aer (==0.15.1)"'.
What version of poetry are you using @vprusso ?
Hmm. That's weird. I can't say that I've seen this error before.
What version of poetry are you using @vprusso ?
$ poetry --version
Poetry (version 1.8.3)
$ python --version
Python 3.12.6
$ cmake --version
cmake version 3.29.5
Additionally, I have this running on both M1 and Intel-based Mac devices
Might be a shot in the dark, but I see you're running Python 3.13. I wonder if qiskit-aer
is not up-to-date with that version of Python yet as may be throwing those errors.
@WrathfulSpatula / @cosenal, have you seen anything similar to the error output that @willzeng is showing here? I can't say I've seen anything like it before.
I find it odd that your cmake is > 3.10, but then you are getting this as part of your error output. That is a bit curious to me.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
It goes into building the package with cmake, because qiskit-aer doesn't offer wheels for Python 3.13. I'd stick with Python 3.12 for now.
Yep @cosenal that was it! Looks like qiskit-aer
doesn't yet straightforwardly build with cmake. I'll add a note about this to the readme for now to further emphasize it so that others don't get caught out.
I'm getting an error on
poetry install
that looks to be an issue withqiskit-aer
andcmake
. Note that I have:Also, I am able to successfully install
qiskit-aer==0.15.1
into other python envs usingpip
.I'm going to see about tracking it down on the qiskit side, but if you've seen this or have suggestions let me know. Could be something we should add to the install guide to help other users who might run into the same issue @WrathfulSpatula