-
Notifications
You must be signed in to change notification settings - Fork 123
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.11 Windows ARM64 #246
Comments
Downloading the embedded Python build would be easy enough. I don't know how to tell NSIS to make an ARM64 installer, though - can you find out about that? I would also guess that few packages have pre-built Windows ARM64 wheels, which might limit how useful it is. |
The installer doesn't need to be in ARM64 I think. Right now there's not much info about Python on ARM64, since Python 3.11 is still in alpha stage. I guess once it becomes official we will see more packages getting ARM64 builds |
Ah, I see, NSIS will make an x86 exe which runs in an emulator on ARM Windows, according to https://sourceforge.net/p/nsis/feature-requests/547/ . At some point I guess it will be possible to build a native ARM64 installer, but not yet, it appears. |
Do you want to make a PR? The code to make the URL to download Python from is here: Lines 182 to 190 in 0e05f3e
In the config file, I'd suggest introducing a new parameter like Line 83 in 0e05f3e
Line 235 in 0e05f3e
You'll also need to adapt anywhere else that uses |
It would probably be better to wait until Python 3.11 goes out of beta. I somewhat got a messy implementation working, the installer will run fine on ARM systems via emulation and it will install the ARM64 version of the Python program. You can even build the installer on your regular x86 machine however for tkinter to work, you have to get the relevant files off an ARM Python installation and you need a device which can run Windows on ARM for that. So far I haven't tested builds with tkinter as I've now removed Windows from my Raspberry so have to go through the whole install process again. I'll keep the changes to my own fork for now and will PR when the official release of 3.11 is out. |
Sounds good, thanks. 👍 Tkinter is kind of a pain in general - it's not in the embeddable builds, which is fair enough, but as far as I know there's no good way to get it without the full Python installer - there's no package on PyPI or anything. I'm not going to solve that, but if someone does, I hope Pynsist can take advantage of it. |
Happy to report that after building the ARM installer with the modified pynsist and including the ARM tkinter files my program successfully installs and runs in ARM64 native. However the installer is suggesting the Program Files (x86) directory by default when selecting Install for all users, so need to figure that out. There is a Program Files (Arm) folder but some sources are saying its for ARM32 apps. Notepad++ ARM64 version simply installs to the normal Program Files folder. |
There's a workaround in the code because the NSIS MultiUser extension used the wrong program files on x86-64 machines. Maybe that needs to be used on ARM too: Lines 258 to 265 in 0e05f3e
|
Seems like it's not as easy as I thought. While working on my next update of my program, I had to include one new package but turns out they don't have a specific arm64 Windows wheel yet. Link The other packages I used if I'm not mistaken had universal wheels, which is why I didn't run into any problems. So pynsist needs to look for specific Windows ARM64 wheels too. |
Yup, it's easy for pure Python projects, but quite probably a headache for any project with compiled extension modules. |
Python has started offering embeddables and installers for Python 3.11 Windows ARM64. Is this something pynsist can include, if I want to distribute a native Windows ARM build?
https://www.python.org/downloads/release/python-3110a7/
You could probably add arm64 as an option for bitness in the config file.
The text was updated successfully, but these errors were encountered: