-
Notifications
You must be signed in to change notification settings - Fork 553
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
Python 3.10.11 macOS: tk.h version (8.5) doesn't match libtk.a version (8.6) #649
Comments
This is a similar issue to #402. |
Hello @QuLogic |
Just an FYI I'm encountering the same issue with my rfswarm builds, the issue seems to be specific to python 3.10 on MacOS Not sure how helpful this is but I'll add it in case it helps find the cause:
Here's my stack trace from stderr:
A quick internet search for " Let me know if I can be of any more help? Dave. |
I'm seeing this also, Python 3.10 on macOS failing with a tk.h related error. I feel I've had this same thing a few years ago, maybe #402 mentioned above... My last good build was 29 March, and the configuration was:
Currently the configuration is:
Some change to Python version, no change to Matplotlib. |
And now it's spread to Python 3.9: https://dev.azure.com/matplotlib/matplotlib/_build/results?buildId=34189&view=logs&j=d565cd3d-5b64-5d92-00ca-77c8c01737e7&t=44ca2d65-e117-5342-7366-f7ed442af407&l=416 Is there any progress? It's been 2 months now. |
It also seems to be affecting github actions: https://github.com/matplotlib/matplotlib/actions/runs/5326817190/jobs/9649372136?pr=26154#step:13:420 |
Try this solution https://stackoverflow.com/a/60469203/8239990
|
Has anyone found a solution for this? I am currently unable to build any 3.8 version with proper tk support on macOS... I tried to use the environment tricks, but none of them works, |
Have you try my suggestion above? I use it to successfully set up python 3.8 -> 3.11. |
Yes, I did. No change. |
Could you share your installation log? |
This is for 3.8.12, but I tried all 3.8 minors from 12 to 17, same issue.
|
I tried reinstalling Python versions with this trick but only >= python 3.11 works. Could you try on your env? if works, maybe you should upgrade the python version. |
I wish I could, but I need 3.8 for https://github.com/diStyApps/Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI ... Do you remember which minor of 3.8 you were able to install with the trick? EDIT: as a matter of fact 3.11.4 does not require any
|
I just use poetry to install this repo's dependency on Python 3.11. It works! |
Yes, I just did the same, it took a while as I had to build wheels for |
I think that's the best workaround for now |
Just found this, it might shed some light on the issue: |
I tried adding the following to my github workflow:
It fails at
i also tried this but got a similar result
Unless I can get the workaround working I won't merge it into my release branches, so for now most of my MacOS builds are still failing. but I now have a branch I can use to test various workarounds for this issue. Can anyone guide me where I want wrong with this workaround? As previously noted by @petercorke the original issue is impacting python 3.10, I have found it's actually now impacting python versions 3.7, 3.8, 3.9 and 3.10 (basically everything below 3.11 which is a degradation from earlier when it was only impacting version 3.9. Dave. |
This is still a problem on all macOS images ( Edit: I've run a simple tk test and this is the current status:
So basically anything lower than Python 3.11 still fails |
Update several unit tests' skipif condition according to actions/setup-python#649
Not sure if you're still interested in a workaround, but for github actions, I found that installing python using steps:
- uses: actions/checkout@v3
- name: (MacOS, <3.11) Fix Python's tkinter
shell: bash
if: ${{ startswith(matrix.os, 'macos-') && contains('3.9;3.10', matrix.python-version) }}
run: |
brew install tcl-tk pyenv openssl readline sqlite3 xz zlib
env \
PATH="$(brew --prefix tcl-tk)/bin:$PATH" \
LDFLAGS="-L$(brew --prefix tcl-tk)/lib" \
CPPFLAGS="-I$(brew --prefix tcl-tk)/include" \
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
CFLAGS="-I$(brew --prefix tcl-tk)/include" \
PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I$(brew --prefix tcl-tk)/include' --with-tcltk-libs='-L$(brew --prefix tcl-tk)/lib -ltcl8.6 -ltk8.6'" \
pyenv install ${{matrix.python-version}}
pyenv global ${{matrix.python-version}} |
In case this is useful to other people, as shown in #649 (comment) the default macOS Python |
Hello everyone👋, |
I've re-run one of the failing tests I created last year (logs don't last that long) and it looks like it's still an issue in the latest patch releases for Python 3.6 to 3.10 (both included) for macOS 12 and 13: |
Description:
Azure appears to be slowly rolling out image version
20230408.1
. This seems to have hit our Python 3.10 jobs with the error:This didn't affect the 3.9 job, which is also using the
20230408.1
image.Action version:
0.214.0
Platform:
Runner type:
Tools version:
3.10.11
Repro steps:
https://dev.azure.com/matplotlib/matplotlib/_build/results?buildId=32988&view=logs&j=de24e77b-0042-5832-9c98-cc3b6fa75eaf&t=6ee7601c-9c40-4d21-ae8c-c759c54cae95
Expected behavior:
Tk works correctly.
Actual behavior:
A runtime error is raised when attempting to import Tk:
The text was updated successfully, but these errors were encountered: