-
Notifications
You must be signed in to change notification settings - Fork 28
ModuleNotFoundError: No module named '_struct' #48
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
Comments
Just tested the same script with: And the script works with both of those versions. |
Thanks for doing this testing. It looks like requests itself doesn't full support Python 3.11.x yet: https://github.com/psf/requests/releases/tag/v2.28.0 In the meantime, perhaps we should mark 3.11 as |
I think labelling it |
I don't think this has anything to do with requests per se, it's a general issue with 3.11 and relocatable-python: |
With gregneagle/relocatable-python#31 (comment), I was able to work around this with simple script:
This script could replace the symlink for
|
Per the suggestion by Nick I have potentially applied his fix for both 3.11 and 3.12 https://github.com/macadmins/python/releases/tag/v3.11.7.80735 need help testing. |
Hi @erikng However both
Thanks for looking into this. Ben |
What is your shebang? Or how are you invoking the script? Per Nick's comment it seemed to suggest that you would not be able to use the direct shebang path by the instead use the shim. |
Okay I think my build script failed. I see the original symbolic link and I think it didn't get installed, but you already have it from the 3.9 and 3.10 tests. Will investigate today. |
https://github.com/macadmins/python/releases/tag/v3.9.13.80737 I've tested 3.12.1.80737 and I am able to import the requests library
|
so interestingly, I can't get the error reported with requests when not using the shim
|
I read the other linked ticket again and now I understand why. so if you call it's full path it works, the shim is what doesn't work. I'm closing this as it's solved for now with the hack nick posted. |
Hi
I've installed "Python 3.11.1.80716" and tested a script that works with the previous Python 3.9.10 release.
I get the following error:
I'll install the other pre-release versions and test with those.
Thanks
Ben
I’m #MadeByDyslexia – expect creative thinking & creative spelling.
The text was updated successfully, but these errors were encountered: