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

uv python install 3.13t issues on Windows and Linux #8194

Closed
colesbury opened this issue Oct 15, 2024 · 7 comments
Closed

uv python install 3.13t issues on Windows and Linux #8194

colesbury opened this issue Oct 15, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@colesbury
Copy link

Nice work! This is my favorite way to install Python. I ran into two issues:

On Windows, uv python install 3.13t doesn't seem to install a free-threaded build.

> uv python install 3.13t
> uv python list
cpython-3.13.0-windows-x86_64-none     AppData\Roaming\uv\python\cpython-3.13.0+freethreaded-windows-x86_64-none\python.exe

> uv run -p 3.13t python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
0

On Linux, uv python install 3.13t installs a debug build:

> uv run -p 3.13t python -c "import sysconfig; print(sysconfig.get_config_var('CFLAGS'))"
-fno-strict-overflow -Wsign-compare -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Og -Wall  -fPIC

Whereas 3.13 (GIL) is an optimized build, like I'd expect:

> uv run -p 3.13 python -c "import sysconfig; print(sysconfig.get_config_var('CFLAGS'))"
-fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall  -fPIC
@zanieb
Copy link
Member

zanieb commented Oct 15, 2024

Thanks for the report! I'll look into this.

@zanieb zanieb added the bug Something isn't working label Oct 15, 2024
@zanieb zanieb self-assigned this Oct 15, 2024
charliermarsh pushed a commit that referenced this issue Oct 15, 2024
@colesbury
Copy link
Author

In case this is helpful, for the free threaded Windows build:

  • If you use the batch scripts (e.g., PCBuild/build.bat), you should pass --disable-gil
  • If you use MSBuild (on PCBuild/pcbuild.proj), you should pass /p:DisableGil=true
  • IIRC, MSBuild copies PC/pyconfig.h.in to PC/pyconfig.h and replaces the /* #define Py_GIL_DISABLED 1 */ with #define Py_GIL_DISABLED 1

@colesbury
Copy link
Author

Oh, I see now you already have a PR in progress: indygreg/python-build-standalone#368.

@zanieb
Copy link
Member

zanieb commented Oct 15, 2024

Yep! Sorry about that. I should have the fix out soon — just takes a while to build all the distributions over there.

@charliermarsh
Copy link
Member

@zanieb -- Is this one closed out given your recent merge?

@zanieb
Copy link
Member

zanieb commented Oct 17, 2024

Yep!

Closed by #8196 and #8268

Will be released soon.

@zanieb zanieb closed this as completed Oct 17, 2024
@farzbood
Copy link

farzbood commented Oct 18, 2024

based on Python 3.13.0 docs

To check if the current interpreter supports free-threading, python -VV and sys.version contain “experimental free-threading build”.
but the managed python 3.13t installed by uv python install 3.13t doesn't show the expected output!
image
(edit):
how to remove/unistall a managed python version? deleting the installation path take care of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants