I am trying to install the (seemingly abandoned) stringcase
python package with a python3.13.2
build on ubuntu in a venv
like so::
python3.13 -m venv venv
source venv/bin/activate
pip install -U pip
pip install stringcase
However, I get the following error::
Collecting stringcase
Using cached stringcase-1.2.0.tar.gz (3.0 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Traceback (most recent call last):
File "/home/fgoudreault/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/home/fgoudreault/venv/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 "/home/fgoudreault/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 3, in <module>
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 160, in setup
dist.parse_config_files()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 730, in parse_config_files
self._parse_config_files(filenames=inifiles)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 599, in _parse_config_files
opt = self._enforce_underscore(opt, section)
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 629, in _enforce_underscore
raise InvalidConfigError(
...<3 lines>...
)
setuptools.errors.InvalidConfigError: Invalid dash-separated key 'description-file' in 'metadata' (setup.cfg), please use the underscore name 'description_file' instead.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Meanwhile, if I use a python 3.12.3
build, the install proceeds successfully. Therefore, I am tempted to conclude that the error comes from an installing library. I tried downgrading setuptools
but to no avail. The error message seems strange since the setup.cfg
file on the package github repo does not contain the problematic line mentioned in the error.
My question is: what is the source of the problem and why is this happening?
I am trying to install the (seemingly abandoned) stringcase
python package with a python3.13.2
build on ubuntu in a venv
like so::
python3.13 -m venv venv
source venv/bin/activate
pip install -U pip
pip install stringcase
However, I get the following error::
Collecting stringcase
Using cached stringcase-1.2.0.tar.gz (3.0 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Traceback (most recent call last):
File "/home/fgoudreault/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/home/fgoudreault/venv/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 "/home/fgoudreault/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 3, in <module>
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 160, in setup
dist.parse_config_files()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 730, in parse_config_files
self._parse_config_files(filenames=inifiles)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 599, in _parse_config_files
opt = self._enforce_underscore(opt, section)
File "/tmp/pip-build-env-9bqsrgl1/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 629, in _enforce_underscore
raise InvalidConfigError(
...<3 lines>...
)
setuptools.errors.InvalidConfigError: Invalid dash-separated key 'description-file' in 'metadata' (setup.cfg), please use the underscore name 'description_file' instead.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Meanwhile, if I use a python 3.12.3
build, the install proceeds successfully. Therefore, I am tempted to conclude that the error comes from an installing library. I tried downgrading setuptools
but to no avail. The error message seems strange since the setup.cfg
file on the package github repo does not contain the problematic line mentioned in the error.
My question is: what is the source of the problem and why is this happening?
Share Improve this question asked Mar 24 at 15:43 fgoudrafgoudra 9111 gold badge11 silver badges28 bronze badges 11- 4 You're looking at the master branch. This thing hasn't had a release since August 5th, 2017, and the version from back then does have the problematic line. – user2357112 Commented Mar 24 at 15:47
- 2 You might try installing directly from the github repo. – JonSG Commented Mar 24 at 16:19
- 1 Ok found the culprit, this is indeed a new deprecating change from setuptools github/pypa/setuptools/pull/4870 – fgoudra Commented Mar 24 at 16:23
- 2 Alternatively case_converter is a recent module with very similar functionality. Available on pypi. – user19077881 Commented Mar 24 at 16:25
- 2 Not that it answers your question, but integrating abandonware into your project is generally a bad idea. Please consider that carefully! In any case, there are 41 forks on GitHub alone, maybe one of those is actually maintained as a proper project. If not, consider just copying just the code that you actually need from that project (of course keeping things like the licence and copyright intact!) into yours. – Ulrich Eckhardt Commented Mar 24 at 17:55
1 Answer
Reset to default 1As pointed out in the comments, the issue stems from a breaking change introduced by setuptools>=78
. A workaround is to use the PIP_CONSTRAINT
environment variable to tell pip to use a lower version of setuptools
. For instance, in a file named pip-constraint.txt
:
setuptools<78
and then:
PIP_CONSTRAINT=pip-constraint.txt pip install stringcase
works for any python version.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744242676a4564779.html
评论列表(0条)