subprocess-exited-with-error with requirements.txt install
Expected Behavior
When following the instructions for installing given on the main github page, with pip install -r requirements.txt, the requirement install fails with Building wheel for sentencepiece (pyproject.toml) ... error The instructions should be more verbose and the requirements should install
Actual Behavior
Installation fails when installing python packages
Steps to Reproduce
following the instructions listed on main page and then the error occurs
Debug Logs
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
╰─> [120 lines of output]
/tmp/pip-build-env-s_54q1m3/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/tmp/pip-build-env-s_54q1m3/overlay/lib/python3.13/site-packages/setuptools/dist.py:751: 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()
Other
No response
No sure whether it's related, I just encountered the similar error message when installing on macOS, the license part was actually misleading to me. I turned out I need to install cmake on my macOS.
After installing cmake via brew install cmake, pip install -r requirements.txt just worked fine
I had the same error message. Also, I needed to install something on my operating system to fix the error.
How to fix it
-
Check what is missing. See the error message below. In my case
pg_configwas missing. - Look up which package contains the missing executable, e.g. searching for 'ubuntu install pg_config' if you are using ubuntu
- install the package
Running pip install -r requirements.txt should work now.
Further down you see an "Error: xxx executable not found"
You need to install a package, which contains that executable.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
/tmp/pip-build-env-d12hsaz1/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDepreca
tionWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running egg_info
writing psycopg2.egg-info/PKG-INFO
writing dependency_links to psycopg2.egg-info/dependency_links.txt
writing top-level names to psycopg2.egg-info/top_level.txt
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
pg_config executable not found
For me, something related to postgres needed to be installed. This answer contains the solution for different operating systems and distributions.
Unfortunately, the error message in the original posts is cut off before the line, which contains the missing package's name.
The manual installation instructions should include a list of required packages needed for the pip install command to work.
Surprisingly Claude 3.7 Sonnet advice me how to fix it -
On my case (Fedora) it fixed by installing next packages:
sudo dnf install cmake python3-devel postgresql
started installing packages one by one, and got the error on sentencepiece