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 fails with Python 3.13 Free Threading #12747

Closed
1 task done
FabriceSalvaire opened this issue Jun 5, 2024 · 2 comments
Closed
1 task done

Pip fails with Python 3.13 Free Threading #12747

FabriceSalvaire opened this issue Jun 5, 2024 · 2 comments
Labels
resolution: wrong project Should be reported elsewhere

Comments

@FabriceSalvaire
Copy link

Description

Pip fails to install a package (Pillow) with Python 3.13 Free Threading.
I am not sure if the issue is related to pip.
Pillow can be installed from source using python3.13t setup.py install.

I think this is annoying to perform Python 3.13 Free Threading crash test...

Expected behavior

No response

pip version

24.0

Python version

3.13 ft

OS

linux

How to Reproduce

  1. Try to install a package with pip...

Output

>pip install --upgrade pip
Requirement already satisfied: pip in /opt/python-virtual-env/free-thread/lib64/python3.13/site-packages (23.2.1)
Collecting pip
Obtaining dependency information for pip from https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl.metadata
Downloading pip-24.0-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.0-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 12.0 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.2.1
Uninstalling pip-23.2.1:
Successfully uninstalled pip-23.2.1
Successfully installed pip-24.0

>pip install setuptools
Collecting setuptools
Using cached setuptools-70.0.0-py3-none-any.whl.metadata (5.9 kB)
Using cached setuptools-70.0.0-py3-none-any.whl (863 kB)
Installing collected packages: setuptools
Successfully installed setuptools-70.0.0
>pip install pillow
Collecting pillow
Downloading pillow-10.3.0.tar.gz (46.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.6/46.6 MB 14.3 MB/s eta 0:00:00
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
╰─> [21 lines of output]
Traceback (most recent call last):
File "/opt/python-virtual-env/free-thread/lib64/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
~~~~^^
File "/opt/python-virtual-env/free-thread/lib64/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/python-virtual-env/free-thread/lib64/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-cpz4twfh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-cpz4twfh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-cpz4twfh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 33, in <module>
File "<string>", line 27, in get_version
KeyError: '__version__'
[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.

Code of Conduct

@FabriceSalvaire FabriceSalvaire added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jun 5, 2024
@pfmoore pfmoore added resolution: wrong project Should be reported elsewhere and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jun 5, 2024
@pfmoore
Copy link
Member

pfmoore commented Jun 5, 2024

As noted in the message, the error is from the build subprocess, not from pip. It looks like it's coming from setuptools.

@notatallshaw
Copy link
Member

notatallshaw commented Jun 5, 2024

Also, you should use pip 24.1b1 ( https://pypi.org/project/pip/24.1b1/ ) to test Python 3.13 Free Threading, it contains important vendored updates to allow packages to specify they are Free Threading compatible.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: wrong project Should be reported elsewhere
Projects
None yet
Development

No branches or pull requests

3 participants