-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Python 3.10 support #5693
Comments
I can get a functional executable on Linux if I:
Number 3 is a hack - we'll need to work out why the original approach to inject those runtime modules isn't working. |
Because |
We'll need to address
instead of
(it's a 32-bit int, so there's no shortage of space...). |
The issue is NOT resolved fully. I have Beta 4 of Python 10 installed on my (Windows 10) PC (which I must use because I really need pattern matching feature only available in v3.10):
and I made sure my pyinstaller is up to date:
I even tried installing the latest dev build:
I am still getting ImportError: No module named _bootlocale error while trying to convert my python code (that I thoroughly tested) to executable:
I was able to resolve the issue and build the executable by following only the first step of the bwoodsend's comment above |
Do note that the linked PR has not been merged yet nor has this issue been marked as resolved... and it likely won't be until the stable 3.10 release and the python packages that our CI tests against release compatible wheels. |
Use:
to get the 3.10 support branch. |
Hmm, think I'll rebase and push it again, to see how the tests turn out this time. I see that failing test with 3.10 on Linux and macOS was that recursion test that we removed the other day... |
This branch requires bootloader to be rebuilt (due to pyvers change). |
In that case you'll have to do a proper git clone, build the bootloaders, then locally install. Don't use the oneliner because it won't work. |
I appreciate quick responses folks. Given that simple small change that I described resolved an immediate issue for me, in the interest of saving time I will refrain from going the whole distance for now ("do a proper git clone, build the bootloaders, then locally install"). I just wanted to bring the issue to your attention to give back to the community. I did not realize that linked PR has not been merged yet--hopefully that will resolve the issue permanently when done. |
do we have a timeline for this? |
Not really. We'll merge the pull request once 3.10 is officially released and try to do a v4.6 release as soon as possible afterwards. I'll give the PR another rebase now to see if anything new has changed. |
just pinging this now that 3.10.0 is official: https://pythoninsider.blogspot.com/2021/10/python-3100-is-available.html |
3.10 is also the default release on Travis CI on windows, which results in broken builds that involve pyinstaller |
Also looking for an update in regards to this. I just installed 3.10 on a Windows 10 workstation and need to get pyinstaller to work but can't. Any ETA will be greatly appreciated. |
You can always use #5694 (v.5/develop branch) or #6274 (v.4 branch) if you absolutely need to use python 3.10 a day after it was released... (but you need to do an actual git checkout, rebuild the bootloader, and then install from the modified checkout). |
I tried |
I tried as well with the --exclude-module _bootlocale and it worked with a simple Hello world program. However, with a slightly more complex program I'm now getting this:
I'm using these Python libraries:
Could that be the reason? Any way to get around this? |
Packages that use |
🎉 |
i
I used that as well, it made the exe file but the app is not working. it just pops up n goes on its own |
I've just release PyInstaller 4.6 onto PyPI. This release includes support for Python 3.10. |
Python 3.10 is coming. The new
match
,case
stuff is particularly exciting to a developer coming from Rust or Haskell.PyInstaller is a great tool for the developer when she wants to distribute a software application to the end-user without requiring the end-user to have any particular version of python installed. This is can simplify the developer's maintenance efforts - rather than trying to keep her software compatible across multiple versions of Python - and can allow her to take advantage of newer language features, like those found in the newest version of Python.
It would be a great addition for PyInstaller to add support for Python 3.10.
What I have tried:
I have tried, naively, to run PyInstaller against python 3.10.0a6 but immediately ran into at least one issue:
_bootlocale
has been removed in cPython 3.10 and has been replaced with a new_locale._get_locale_encoding()
excluding
_bootlocale
fromPY3_BASE_MODULES
for python 3.10 in PyInstaller/compat.py allows PyInstaller to generate an executable, however from here I kept running into issues when running the resulting binary.It is not obvious to me what needs to be done to support python 3.10, That said, if desirable I am perfectly happy to do what I can with a little direction.
The text was updated successfully, but these errors were encountered: