Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for Python 3.13 on Windows #292

Closed
davidbrochart opened this issue Oct 9, 2024 · 9 comments
Closed

Support for Python 3.13 on Windows #292

davidbrochart opened this issue Oct 9, 2024 · 9 comments

Comments

@davidbrochart
Copy link

I'm trying to publish wheeld for pycrdt on Windows for Python 3.13 and I get an error suggesting that Python 3.13 is not found

🐍 Found CPython 3.8 at C:\hostedtoolcache\windows\Python\3.8.10\x64\python.exe, CPython 3.9 at C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe, CPython 3.10 at C:\hostedtoolcache\windows\Python\3.10.11\x64\python.exe, CPython 3.11 at C:\hostedtoolcache\windows\Python\3.11.9\x64\python.exe, CPython 3.12 at C:\hostedtoolcache\windows\Python\3.12.6\x64\python.exe, CPython 3.13
...
  = note: LINK : fatal error LNK1181: cannot open input file 'python313.lib'

I'm not sure I should report here, or if I'm doing something wrong on my side?

@messense
Copy link
Member

messense commented Oct 9, 2024

Python 3.13 isn't installed by default in Actions runner yet: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#python

You can install it before building using setup-python action manually for the moment.

@messense messense closed this as completed Oct 9, 2024
@JacobCallahan
Copy link

@messense Perhaps I'm doing something wrong, but even after setup-python explicitly adds python 3.13 for all my platforms, maturin doesn't seem to find it and stops at python 3.12. Some links for reference:

Linux x86_64: https://github.com/JacobCallahan/Hussh/actions/runs/11261961543/job/31316640293?pr=19
Run summary view: https://github.com/JacobCallahan/Hussh/actions/runs/11261961543?pr=19
PR with workflow changes: JacobCallahan/Hussh#19

Thanks for your time!

@messense
Copy link
Member

@JacobCallahan See PyO3/maturin#2248

for now you can pass the list of python versions manually via -i, for example https://github.com/jupyter-server/pycrdt/actions/runs/11251137381/workflow#L27

@JacobCallahan
Copy link

@messense very nice! Do you know how soon that will be available in the action, if soon, then I might just hold off instead of doing a temporary workaround.

@JacobCallahan
Copy link

@messense i tried using maturin-action:main for a run to see if the change you linked would help, but it still doesn't look to have detected py3.13

https://github.com/JacobCallahan/Hussh/actions/runs/11308556582/job/31451536529?pr=19

@ddelange
Copy link

fyi adding setup-python doesn't fix failing CI on win i686 for 3.13:
https://github.com/oconnor663/blake3-py/actions/runs/11994284643

workflow file: https://github.com/oconnor663/blake3-py/blob/0440f6dffad73a0001f0472864495b8889dd0358/.github/workflows/dists.yml

obi1kenobi added a commit to langchain-ai/langsmith-sdk that referenced this issue Nov 27, 2024
Building on Windows seems to fail with a linking error, the same one as here: PyO3/maturin-action#292
obi1kenobi added a commit to langchain-ai/langsmith-sdk that referenced this issue Nov 27, 2024
Building on Windows seems to fail with a linking error, the same one as
here: PyO3/maturin-action#292
@ddelange
Copy link

ddelange commented Nov 27, 2024

fwiw, we got python 3.13 to work on windows: oconnor663/blake3-py#46

    - uses: actions/setup-python@v5
      with:
        # pin to the latest supported python version
        python-version: "3.13"
        # x86 python needs to be available for the win32 wheel
        architecture: ${{ ( matrix.os == 'windows-latest' && matrix.target == 'i686' ) && 'x86' || null }}

    - uses: PyO3/maturin-action@v1
      with:
        ...

@ddelange
Copy link

ddelange commented Dec 25, 2024

Reporting back here on my last comment: we got python 3.13t to work on windows: oconnor663/blake3-py#47 and then oconnor663/blake3-py#50

final workflow: dists.yml

for 3.13t (free-threaded python) support, 3.13t needs to be explicitly installed on the runner. to be robust (workflow independent of the cached python versions in the runner images) we install all python versions that we're linking against (including 3.13t using actions/setup-python#973 (comment))

@messense
Copy link
Member

Yeah, there are still some cross compilation bugs in pyo3 I've submitted fixes recently: PyO3/pyo3#4808

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants