You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to install python with PYTHON_GIL=0 throws an error
> pdm install -v
WARNING: Lockfile does not exist
Updating the lock file...
n.use_venv is on, creating a virtualenv for this project...
Run command: ['C:\\Users\\user\\AppData\\Roaming\\pdm\\venv\\Scripts\\python.exe', '-m', 'virtualenv', 'C:\\<project>\\.venv', '-p', 'C:\\Users\\user\\AppData\\Local\\pdm\\pdm\\python\\[email protected]\\python.exe', '--prompt=<project-name>-3.13', '--no-pip', '--no-setuptools','--no-wheel']
RuntimeError: failed to query C:\Users\user\AppData\Local\pdm\pdm\python\[email protected]\python.exe with code 1 err: 'Fatal Python error: config_read_gil: Disabling the GIL is not supported by this build\nPython runtime state: preinitialized\n\n'
[VirtualenvCreateError]: Command '['C:\\Users\\user\\AppData\\Roaming\\pdm\\venv\\Scripts\\python.exe', '-m', 'virtualenv', 'C:\\<project>
loss control strategies\\.venv', '-p', 'C:\\Users\\user\\AppData\\Local\\pdm\\pdm\\python\\[email protected]\\python.exe', '--prompt=<project-name>-3.13',
'--no-pip',
'--no-setuptools', '--no-wheel']' returned non-zero exit status 1.
To reproduce
Create a project with the following pyproject.toml file
[project]
name = "project-name"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
classifiers = ["Private :: Do Not Upload"]
dependencies = [
"numpy==2.1.3",
]
[tool.pdm]
distribution = false
Set the environment variable PYTHON_GIL=0 (e.g. write it to .env and reload shell). Then run pdm install -v
Expected Behavior
python 3.13 install correctly with nogil support
Environment Information
WARNING: Project requires a python version of >=3.13, The virtualenv is being created for you as it cannot be matched to the right version.
INFO: python.use_venv is on, creating a virtualenv for this project...
Virtualenv is created successfully at C:\<project>\.venv
{
"implementation_name": "cpython",
"implementation_version": "3.12.8",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_release": "10",
"platform_system": "Windows",
"platform_version": "10.0.19045",
"python_full_version": "3.13.1",
"platform_python_implementation": "CPython",
"python_version": "3.13",
"sys_platform": "win32"
}
Verbose Command Output
No response
Additional Context
No response
Are you willing to submit a PR to fix this bug?
Yes, I would like to submit a PR.
The text was updated successfully, but these errors were encountered:
Yes, my current version 3.12 is not free-threaded. But it's not clear to my why this should be a problem. I also don't have a global install of python 3.9, but I still can use my current pdm to install 3.9 in the projects where it's needed. I would expect pdm to install a complete version of 3.13, including free-threading, in the projects that require 3.13 even if my global python interpreter is 3.12.
Or maybe I have missed the way to make it more explicit, specifying something like
Describe the bug
Trying to install python with
PYTHON_GIL=0
throws an errorTo reproduce
Create a project with the following
pyproject.toml
fileSet the environment variable
PYTHON_GIL=0
(e.g. write it to.env
and reload shell). Then runpdm install -v
Expected Behavior
python 3.13 install correctly with nogil support
Environment Information
Verbose Command Output
No response
Additional Context
No response
Are you willing to submit a PR to fix this bug?
The text was updated successfully, but these errors were encountered: