Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'pip install stim' failing with python 13.3 #882

Open
yarrriv opened this issue Feb 11, 2025 · 1 comment
Open

'pip install stim' failing with python 13.3 #882

yarrriv opened this issue Feb 11, 2025 · 1 comment

Comments

@yarrriv
Copy link

yarrriv commented Feb 11, 2025

Trying to install stim on a clean new virtual environment. Mac, using pyenv and pyenv-virtualenv, I get this failure. Doesn't happen with python 13.2

Collecting stim
  Using cached stim-1.14.0.tar.gz (813 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from stim)
  Using cached numpy-2.2.2-cp313-cp313-macosx_14_0_arm64.whl.metadata (62 kB)
Using cached numpy-2.2.2-cp313-cp313-macosx_14_0_arm64.whl (5.1 MB)
Building wheels for collected packages: stim
  Building wheel for stim (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for stim (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating python_build_stim/lib.macosx-15.3-arm64-cpython-313/stim
      copying glue/python/src/stim/__init__.py -> python_build_stim/lib.macosx-15.3-arm64-cpython-313/stim
      copying glue/python/src/stim/_main_argv.py -> python_build_stim/lib.macosx-15.3-arm64-cpython-313/stim
      running egg_info
      writing stim.egg-info/PKG-INFO
      writing dependency_links to stim.egg-info/dependency_links.txt
      writing entry points to stim.egg-info/entry_points.txt
      writing requirements to stim.egg-info/requires.txt
      writing top-level names to stim.egg-info/top_level.txt
      reading manifest file 'stim.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'stim.egg-info/SOURCES.txt'
      copying glue/python/src/stim/__init__.pyi -> python_build_stim/lib.macosx-15.3-arm64-cpython-313/stim
      running build_ext
      building 'stim._detect_machine_architecture' extension
      creating python_build_stim/temp.macosx-15.3-arm64-cpython-313/src/stim/py
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/private/var/folders/96/1qfjtn4s093glnxx8jn46fmw0000gn/T/pip-build-env-t2i_jqjc/overlay/lib/python3.13/site-packages/pybind11/include -Isrc -I/Users/myusername/.pyenv/versions/3.13.1/envs/test/include -I/Users/myusername/.pyenv/versions/3.13.1/include/python3.13 -c src/stim/py/march.pybind.cc -o python_build_stim/temp.macosx-15.3-arm64-cpython-313/src/stim/py/march.pybind.o -std=c++20 -fno-strict-aliasing -O3 -g0 -DVERSION_INFO=1.14.0
      In file included from src/stim/py/march.pybind.cc:1:
      src/stim/py/march.pybind.h:4:10: fatal error: 'string' file not found
          4 | #include <string>
            |          ^~~~~~~~
      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 stim
Failed to build stim

[notice] A new release of pip is available: 24.3.1 -> 25.0.1
[notice] To update, run: python -m pip install --upgrade pip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (stim)
@Strilanc
Copy link
Collaborator

<string> is a standard C++ header; I don't know why it would fail to find it. Probably a misconfiguration on your system. It's somewhat common for builds to fail due to BS like this, and it's why I started making prebuilt wheels. I'm going to interpret this issue as "start prebuilding for python 3.13".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants