Repository navigation
PIP INSTALL failing on OSX #1103
Description
Python 3.13.1
Apple M2
OSX 13.7.1
pip install sentencepiece
Collecting sentencepiece
Using cached sentencepiece-0.2.0.tar.gz (2.6 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: sentencepiece
Building wheel for sentencepiece (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for sentencepiece (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [124 lines of output]
/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: Apache Software License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.macosx-10.13-universal2-cpython-313/sentencepiece
copying src/sentencepiece/__init__.py -> build/lib.macosx-10.13-universal2-cpython-313/sentencepiece
copying src/sentencepiece/_version.py -> build/lib.macosx-10.13-universal2-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-10.13-universal2-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-10.13-universal2-cpython-313/sentencepiece
running build_ext
Package sentencepiece was not found in the pkg-config search path.
Perhaps you should add the directory containing `sentencepiece.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sentencepiece' not found
./build_bundled.sh: line 21: cmake: command not found
./build_bundled.sh: line 22: nproc: command not found
./build_bundled.sh: line 22: cmake: command not found
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
return _build_backend().build_wheel(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
wheel_directory, config_settings, metadata_directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 438, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 426, in _build
return self._build_with_temp_dir(
~~~~~~~~~~~~~~~~~~~~~~~~~^
cmd,
^^^^
...<3 lines>...
self._arbitrary_args(config_settings),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
self.run_setup()
~~~~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 169, in <module>
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 186, in setup
return run_commands(dist)
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
dist.run_commands()
~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
self.run_command(cmd)
~~~~~~~~~~~~~~~~^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
self.run_command("build")
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 1104, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/command/build_ext.py", line 99, in run
_build_ext.run(self)
~~~~~~~~~~~~~~^^^^^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in run
self.build_extensions()
~~~~~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions
self._build_extensions_serial()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/_2/_1tsfrlj77g_jgw20lh_9dsr0000gn/T/pip-build-env-bp9reytw/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial
self.build_extension(ext)
~~~~~~~~~~~~~~~~~~~~^^^^^
File "<string>", line 87, in build_extension
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./build_bundled.sh', '0.2.0']' returned non-zero exit status 127.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sentencepiece
Failed to build sentencepiece
ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece)
Activity
exdysa commentedon Apr 2, 2025
Error received via github actions.
python 3.13.2
pip-25.0.1
setuptools-78.1.0-py3-none-any
attempted build process on sentencepiece-0.2.0.tar.gz
This is part of a runner that installs from org repo
Note that this is on a remote AMD linux box running Ubuntu (different than initial post), and that this project uses setuptools (same as initial post)
Attempted fixes:
thanks @karlsolomon , python 3.12 solved it here
karlsolomon commentedon Apr 2, 2025
This seems to be an issue in compatibility with python 3.13. I saw the same issue you did with 3.13.2, however when I reverted to both 3.11.11 and 3.12.9 I was able to install sentencepiece.
Installations failed with both pacman and uv/pip package managers when using python 3.13.
OS: Linux 6.13.8-arch1-1
Salakksson commentedon Apr 5, 2025
i believe the issue is cmake version is being wrongly detected as it went to 4.0.0, downgrading cmake to 3.31.6 fixed the issue for me, i know nothing about this project but it was a dependancy and i had this issue i believe, i dont know if its an issue with this project or something with pip because i dont do python.
i dont see any reason why the version of a c compiler should ever matter, as long as its not msvc it will probably compile
kamikaze commentedon Jun 25, 2025
same on linux/amd64 building in docker.
crusaderky commentedon Jun 27, 2025
Closed by #1120
taku910 commentedon Aug 12, 2025
Fixed in https://github.com/google/sentencepiece/releases/tag/v0.2.1