question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

M1 install issue due to tweedledum

See original GitHub issue

What is the expected behaviour?

pip install qiskit

Should install qiskit but instead currently fails while trying to build tweedledum.

I’m hoping there could maybe be a m1 wheel available that circumvents this issue.

(base)  ~/Downloads/ pip install qiskit

Collecting qiskit
  Using cached qiskit-0.37.2-py3-none-any.whl
Collecting qiskit-terra==0.21.2
  Using cached qiskit_terra-0.21.2-cp39-cp39-macosx_11_0_arm64.whl (6.3 MB)
Collecting qiskit-aer==0.10.4
  Using cached qiskit_aer-0.10.4-cp39-cp39-macosx_11_0_arm64.whl (8.4 MB)
Collecting qiskit-ibmq-provider==0.19.2
  Using cached qiskit_ibmq_provider-0.19.2-py3-none-any.whl (240 kB)
Requirement already satisfied: numpy>=1.16.3 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from qiskit-aer==0.10.4->qiskit) (1.22.4)
Requirement already satisfied: scipy>=1.0 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from qiskit-aer==0.10.4->qiskit) (1.8.1)
Requirement already satisfied: requests>=2.19 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.19.2->qiskit) (2.28.1)
Collecting websockets>=10.0
  Using cached websockets-10.3-cp39-cp39-macosx_11_0_arm64.whl (97 kB)
Requirement already satisfied: urllib3>=1.21.1 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.19.2->qiskit) (1.26.11)
Collecting websocket-client>=1.0.1
  Using cached websocket_client-1.4.1-py3-none-any.whl (55 kB)
Collecting requests-ntlm>=1.1.0
  Using cached requests_ntlm-1.1.0-py2.py3-none-any.whl (5.7 kB)
Requirement already satisfied: python-dateutil>=2.8.0 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.19.2->qiskit) (2.8.2)
Collecting tweedledum<2.0,>=1.1
  Using cached tweedledum-1.1.1.tar.gz (4.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting symengine>=0.9
  Using cached symengine-0.9.2-cp39-cp39-macosx_11_0_arm64.whl (14.9 MB)
Collecting psutil>=5
  Using cached psutil-5.9.2-cp39-cp39-macosx_12_0_arm64.whl
Collecting ply>=3.10
  Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting sympy>=1.3
  Using cached sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting dill>=0.3
  Using cached dill-0.3.5.1-py2.py3-none-any.whl (95 kB)
Collecting retworkx>=0.11.0
  Using cached retworkx-0.11.0-cp39-cp39-macosx_11_0_arm64.whl (1.2 MB)
Collecting stevedore>=3.0.0
  Using cached stevedore-4.0.0-py3-none-any.whl (49 kB)
Requirement already satisfied: six>=1.5 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from python-dateutil>=2.8.0->qiskit-ibmq-provider==0.19.2->qiskit) (1.16.0)
Requirement already satisfied: charset-normalizer<3,>=2 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.19.2->qiskit) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.19.2->qiskit) (2022.6.15)
Requirement already satisfied: idna<4,>=2.5 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.19.2->qiskit) (3.3)
Requirement already satisfied: cryptography>=1.3 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.19.2->qiskit) (37.0.4)
Collecting ntlm-auth>=1.0.2
  Using cached ntlm_auth-1.5.0-py2.py3-none-any.whl (29 kB)
Collecting pbr!=2.1.0,>=2.0.0
  Using cached pbr-5.10.0-py2.py3-none-any.whl (112 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.2.1-py3-none-any.whl (532 kB)
Requirement already satisfied: cffi>=1.12 in /Users/thisas/miniforge3/lib/python3.9/site-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.19.2->qiskit) (1.15.1)
Requirement already satisfied: pycparser in /Users/thisas/miniforge3/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.19.2->qiskit) (2.21)
Building wheels for collected packages: tweedledum
  Building wheel for tweedledum (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for tweedledum (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [283 lines of output]
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:129: _InvalidFile: The given `pyproject.toml` file is invalid and would be ignored.
          !!


          ############################
          # Invalid `pyproject.toml` #
          ############################

          Any configurations in `pyproject.toml` will be ignored.
          Please note that future releases of setuptools will halt the build process
          if an invalid file is given.

          To prevent setuptools from considering `pyproject.toml` please
          DO NOT include the `[project]` or `[tool.setuptools]` tables in your file.


      !!

        if _skip_bad_config(project_table, orig_setuptools_table, dist):
      Not searching for unused variables given on the command line.
      -- The C compiler identification is AppleClang 13.1.6.13160021
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is AppleClang 13.1.6.13160021
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/_cmake_test_compile/build
      -- The CXX compiler identification is AppleClang 13.1.6.13160021
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
      -- Found Eigen3: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/eigen (found suitable version "3.4.0", minimum required is "3.3")
      -- Found fmt: /opt/homebrew/include (found suitable version "9.1.0", minimum required is "7.0.0")
      -- Found nlohmann_json: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/nlohmann (found suitable version "3.9.1", minimum required is "3.9.0")
      -- Found phmap: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/parallel_hashmap (found suitable version "1.0.0", minimum required is "1.0.0")
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
      -- Found Threads: TRUE
      -- pybind11 v2.6.2
      CMake Warning (dev) at /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.24/Modules/CMakeDependentOption.cmake:89 (message):
        Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
        Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
        cmake_policy command to set the policy and suppress this warning.
      Call Stack (most recent call first):
        external/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonInterp: /Users/thisas/miniforge3/bin/python3.9 (found version "3.9.13")
      -- Found PythonLibs: /Users/thisas/miniforge3/lib/libpython3.9.dylib
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Performing Test HAS_FLTO_THIN
      -- Performing Test HAS_FLTO_THIN - Success
      -- Configuring done
      -- Generating done
      CMake Warning:
        Manually-specified variables were not used by the project:

          Python3_EXECUTABLE
          Python3_INCLUDE_DIR
          Python3_LIBRARY
          Python_EXECUTABLE
          Python_INCLUDE_DIR
          Python_LIBRARY


      -- Build files have been written to: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/_skbuild/macosx-12.0-arm64-3.9/cmake-build
      [1/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorCubes.cpp.o
      [2/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorUtil.cpp.o
      [3/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorBits.cpp.o
      [4/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/satStore.cpp.o
      [5/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorLink.cpp.o
      [6/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorList.cpp.o
      [7/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/AbcGlucose.cpp.o
      [8/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exor.cpp.o
      [9/73] Linking CXX static library external/abcesop/liblibabcesop.a
      [10/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/SimpSolver.cpp.o
      [11/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/satSolver.cpp.o
      [12/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/Glucose.cpp.o
      [13/73] Linking CXX static library external/abcsat/liblibabcsat.a
      [14/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/kitty.cpp.o
      [15/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/wires.cpp.o
      [16/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/bindings.cpp.o
      [17/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/instruction.cpp.o
      [18/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/extension.cpp.o
      [19/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/meta.cpp.o
      [20/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/ising.cpp.o
      [21/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/QASM/Lexer.cpp.o
      [22/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/target/mapping.cpp.o
      [23/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/circuit.cpp.o
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/python/tweedledum/ir/circuit.cpp:86:35: warning: 'size' is deprecated: Use num_instructions(). [-Wdeprecated-declarations]
              .def("__len__", &Circuit::size)
                                        ^
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/include/tweedledum/Utils/Visualization/../../IR/Circuit.h:41:7: note: 'size' has been explicitly marked deprecated here
          [[deprecated("Use num_instructions().")]]
            ^
      1 warning generated.
      [24/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/utils/utils.cpp.o
      [25/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/standard.cpp.o
      [26/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/target/device.cpp.o
      [27/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/QASM/Parser.cpp.o
      [28/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/qasm.cpp.o
      [29/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/tfc.cpp.o
      [30/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/BridgeDecomposer.cpp.o
      [31/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/mockturtle.cpp.o
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/python/tweedledum/classical/mockturtle.cpp:54:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
              lorina::read_aiger(filename, aiger_reader(xag));
              ^~~~~~~~~~~~~~~~~~
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/python/tweedledum/classical/mockturtle.cpp:60:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
              lorina::read_dimacs(filename, dimacs_reader(xag));
              ^~~~~~~~~~~~~~~~~~~
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/python/tweedledum/classical/mockturtle.cpp:66:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
              lorina::read_verilog(filename, verilog_reader(xag));
              ^~~~~~~~~~~~~~~~~~~~
      3 warnings generated.
      [32/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/ParityDecomposer.cpp.o
      [33/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/barenco_decomp.cpp.o
      [34/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/passes/passes.cpp.o
      [35/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/BarencoDecomposer.cpp.o
      [36/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/OneQubitDecomposer.cpp.o
      [37/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/bridge_decomp.cpp.o
      [38/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/parity_decomp.cpp.o
      [39/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/one_qubit_decomp.cpp.o
      [40/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/synthesis/synthesis.cpp.o
      [41/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/LinePlacer.cpp.o
      [42/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/RandomPlacer.cpp.o
      [43/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/TrivialPlacer.cpp.o
      [44/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/ApprxSatPlacer.cpp.o
      [45/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/SatPlacer.cpp.o
      [46/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/gate_cancellation.cpp.o
      [47/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/RePlacer/JitRePlacer.cpp.o
      [48/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/utils.cpp.o
      [49/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/RePlacer/SabreRePlacer.cpp.o
      [50/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/linear_resynth.cpp.o
      [51/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/BridgeRouter.cpp.o
      [52/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/steiner_resynth.cpp.o
      [53/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/phase_folding.cpp.o
      [54/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/JitRouter.cpp.o
      [55/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/SabreRouter.cpp.o
      [56/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/all_linear_synth.cpp.o
      [57/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/a_star_swap_synth.cpp.o
      [58/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/xag/xag_synth.cpp.o
      [59/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/decomp_synth.cpp.o
      [60/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/diagonal_synth.cpp.o
      [61/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/cx_dihedral_synth.cpp.o
      [62/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/lhrs/lhrs_synth.cpp.o
      [63/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/linear_synth.cpp.o
      [64/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/gray_synth.cpp.o
      [65/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
      FAILED: CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DABC_NAMESPACE=pabc -DABC_NO_USE_READLINE -DDISABLE_NAUTY -DFMT_HEADER_ONLY=1 -DLIN64 -D_tweedledum_EXPORTS -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/include -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/abcsat -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/abcesop -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/abcresub -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/pybind11/include -isystem /Users/thisas/miniforge3/include/python3.9 -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/eigen -isystem /opt/homebrew/include -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/mockturtle -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/kitty -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/lorina -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/rang -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/parallel_hashmap -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/percy -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/nlohmann -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/external/bill -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.0 -fPIC -fvisibility=hidden -flto -std=gnu++17 -MD -MT CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -MF CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o.d -o CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -c /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/src/Utils/Visualization/string_utf8.cpp
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/src/Utils/Visualization/string_utf8.cpp:328:15: error: no matching function for call to 'format'
                    fmt::format(U"{:>2}", wire - diagram.num_qubits());
                    ^~~~~~~~~~~
      /opt/homebrew/include/fmt/core.h:3204:31: note: candidate function [with T = <unsigned int>] not viable: no known conversion from 'const char32_t [6]' to 'format_string<unsigned int>' (aka 'basic_format_string<char, unsigned int>') for 1st argument
      FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
                                    ^
      /opt/homebrew/include/fmt/format.h:4183:13: note: candidate template ignored: requirement 'detail::is_locale<char32_t [6], void>::value' was not satisfied [with Locale = char32_t [6], T = <>]
      inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
                  ^
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/src/Utils/Visualization/string_utf8.cpp:327:34: error: no viable conversion from 'basic_string<char, char_traits<char>, allocator<char>>' to 'const basic_string<char32_t, char_traits<char32_t>, allocator<char32_t>>'
                  std::u32string const wire_label =
                                       ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:822:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const std::u32string &' for 1st argument
          basic_string(const basic_string& __str);
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:827:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'std::u32string &&' for 1st argument
          basic_string(basic_string&& __str)
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:840:5: note: candidate constructor template not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const char32_t *' for 1st argument
          basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:895:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'initializer_list<char32_t>' for 1st argument
          basic_string(initializer_list<_CharT> __il);
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:815:40: note: explicit constructor is not a candidate
          _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                             ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:881:18: note: explicit constructor is not a candidate
              explicit basic_string(const _Tp& __t);
                       ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:903:5: note: candidate function
          operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
          ^
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/src/Utils/Visualization/string_utf8.cpp:424:11: error: no matching function for call to 'format'
                fmt::format(U"{:>2}", wires_.back() - diagram.num_qubits());
                ^~~~~~~~~~~
      /opt/homebrew/include/fmt/core.h:3204:31: note: candidate function [with T = <unsigned int>] not viable: no known conversion from 'const char32_t [6]' to 'format_string<unsigned int>' (aka 'basic_format_string<char, unsigned int>') for 1st argument
      FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
                                    ^
      /opt/homebrew/include/fmt/format.h:4183:13: note: candidate template ignored: requirement 'detail::is_locale<char32_t [6], void>::value' was not satisfied [with Locale = char32_t [6], T = <>]
      inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
                  ^
      /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/src/Utils/Visualization/string_utf8.cpp:423:30: error: no viable conversion from 'basic_string<char, char_traits<char>, allocator<char>>' to 'const basic_string<char32_t, char_traits<char32_t>, allocator<char32_t>>'
              std::u32string const wire_label =
                                   ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:822:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const std::u32string &' for 1st argument
          basic_string(const basic_string& __str);
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:827:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'std::u32string &&' for 1st argument
          basic_string(basic_string&& __str)
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:840:5: note: candidate constructor template not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const char32_t *' for 1st argument
          basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:895:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'initializer_list<char32_t>' for 1st argument
          basic_string(initializer_list<_CharT> __il);
          ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:815:40: note: explicit constructor is not a candidate
          _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                             ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:881:18: note: explicit constructor is not a candidate
              explicit basic_string(const _Tp& __t);
                       ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:903:5: note: candidate function
          operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
          ^
      4 errors generated.
      [66/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/pprm_synth.cpp.o
      [67/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/transform_synth.cpp.o
      [68/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Target/Device.cpp.o
      [69/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/steiner_gauss_synth.cpp.o
      [70/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/spectrum_synth.cpp.o
      [71/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/pkrm_synth.cpp.o
      ninja: build stopped: subcommand failed.
        File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
          cmkr.make(make_args, install_target=cmake_install_target, env=env)
        File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 680, in make
          self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
        File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 704, in make_impl
          raise SKBuildError(


      --------------------------------------------------------------------------------
      -- Trying "Ninja" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Ninja" generator - success
      --------------------------------------------------------------------------------

      Configuring Project
        Working directory:
          /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/_skbuild/macosx-12.0-arm64-3.9/cmake-build
        Command:
          cmake /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/_skbuild/macosx-12.0-arm64-3.9/cmake-install/python -DPYTHON_VERSION_STRING:STRING=3.9.13 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPython3_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPython3_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DPython_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPython_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPython_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DPYTHON_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPYTHON_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-4n2392hp/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=12.0 -DCMAKE_OSX_ARCHITECTURES:STRING=arm64

      Traceback (most recent call last):

      An error occurred while building with CMake.
        Command:
          cmake --build . --target install --config Release --
        Install target:
          install
        Source directory:
          /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f
        Working directory:
          /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-w7llld42/tweedledum_90f313832451432ebe424ead43996e4f/_skbuild/macosx-12.0-arm64-3.9/cmake-build
      Please check the install target is valid and 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 tweedledum
Failed to build tweedledum
ERROR: Could not build wheels for tweedledum, which is required to install pyproject.toml-based projects

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
mtreinishcommented, Sep 13, 2022

FWIW, my normal suggestion in this case is to do something like pip install --prefer-binary tweedledum qiskit-terra which should install tweedledum from a precompiled binary along with terra.

@jakelishman environment markers are gonna be a bit tricky here, the easiest way would probably to have 2 entries in the requirements list something like:

tweedledum>=1.1,<2.0;platform_machine != 'arm64'  or sys_platform != 'darwin'
tweedledum>=1.1,<2.0,!=1.1.1;platform_machine == 'arm64' and sys_platform == 'darwin'
1reaction
jakelishmancommented, Sep 13, 2022

From a Terra dev meeting today: we made the decision to move tweedledum to being an optional dependency. Terra 0.22, which will release in about a month, will still have it as a core requirement because we need to issue deprecation warnings, but it will be removed in 0.23.

In the mean time, I’ll see if we can do anything about getting a macOS ARM wheel for tweedledum 1.1.1, and if not, I might be able to tweak the requirement so that only 1.1.0 is permitted for ARM macs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If an error occurred while updating or installing macOS
If an error occurred while updating or installing macOS · Check your internet connection · Install in safe mode · Install after repairing...
Read more >
Apple Provides Instructions to Fix macOS Reinstallation Errors ...
1. If you erased your Mac with Apple M1 chip before updating to macOS Big Sur 11.0.1, you might be unable to reinstall...
Read more >
What to do if your Ventura update is stuck - Macworld
Problem : Mac freezes during installation · 1. Shut down, wait a few seconds, then restart your Mac · 2. Go to System...
Read more >
MAC M1 Something went wrong installing the "sharp" module
Running npm run dev ( gatsby develop ) on MacBook Pro M1 chip exit with Error: Something went wrong installing the "sharp" module....
Read more >
Photoshop for Apple Silicon - Adobe Support
M1 native known issues ; Missing or unsupported extensions. To use extensions that rely on CEP, install and run them in Rosetta mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found