-
Notifications
You must be signed in to change notification settings - Fork 35
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
Apple M1 Support #801
Comments
Nion Swift works if I install the conda create -n nionswift -c nion nionswift python=3.9
conda activate nionswift
conda install /Users/tompekin/Downloads/nionswift-tool-0.4.13-py39_0.tar.bz2
nionswift # this fails with the following output
Please install either pyqt or PySide2 using pip or conda or use nionswift-tool to launch.
conda install pyqt # this was necessary
nionswift # now this works I will continue to use Nion Swift and see if any odd errors arise due to the x64/M1 incompatibilities. |
TL;DR: No M1 support yet and its a few months away, depending on conda-forge community support. And you're using a less performant UI when using pyqt. Read on below... Nion Swift defines a user interface API that is required to be able to run its UI. The UI API is implemented in almost identical ways by The two implementations are very similar, one being a C++ implementation and one being a Python implementation using the underlying Also, Qt has stopped releasing new version of Qt 5.15. Unfortunately, they made this choice right around the time the M1 processor started being used; so with Qt 5, we're stuck using Qt 5.15.3 and that does not support the M1. There are community efforts to support the M1 on Qt 5.15, but so far, nothing is available. Qt also has made available Qt 6 with support for the M1 processor. However, up until now, Qt 6 has not been available for many of the community distributions that we use (i.e. conda-forge and conda), so I've held off making a new UI API implementation for Qt 6 until those are available. Again, they're slowly progressing and I'm hopeful everything will be available soon. Another potential, but expensive, solution in the future is to make purely native (macOS, Windows, Linux) implementations of the UI API and take Qt out of the equation. This would be time consuming, so I'd probably only advocate for this as a last resort if Qt continues to narrow their licensing terms for open source. As a fun thought experiment, too, I've considered making a web browser canvas-based UI API implementation and then be able to run Swift (and any other Also, for reference, the UI API interface is defined here in |
Hi Chris, thanks for the info, it's always interesting to see behind the scenes. Right now, I think Swift works on my M1 Mac using the steps described above, so I wonder if it is useful putting this thread behind a link in the documentation, for anyone else who has the same issue as I do might be helpful. However, I haven't fully tested it as to how much of Swift works w/ M1 + Qt 5.15 |
Hi Chris, any updates on this? |
I've had it running on my local machine for the last month. I think I will be able to get it released in the next Swift release, targeting late July. Also, FYI, there are still issues with not all Python libraries being universal (x86_64 + arm64) so there will still be two separate installers built, but the command line installation should "just work" with whichever architecture you choose. It's possible for technical users to get things running now using the The development branch is here: |
Great to hear! Thanks a ton Chris I'll give it a shot. |
Hi Chris, I tried a bit and pretty much failed to get Swift running on my M1 Mac... both with installing from github and installing the nionui tool. Is this just operator error? |
I'm (hopefully) releasing this next week ... but if you want you can use You can download the proper tool (macOS, probably Python 3.10) here: You will need to have an arm64 conda installation with Then launch it using (the app name and the paths for your conda installation will be different, of course): |
Bumping this again to say that these instructions worked for me, it was a little confusing but so far everything is running great! |
The standard nionswift-tool on the nion channel should work now too:
I'm waiting to close this until I can build an Apple M1 prepackaged installer version; and also the conda-forge arm64 too. Both of those require cross compiling, which I almost have working, but not quite! |
Qt macdeployqt issue (wrt conda-forge): https://bugreports.qt.io/browse/QTBUG-109572 |
I am getting an error when installing Nion Swift as not all the submodules (not sure if that is the right word) are M1/Arm compatible. Nion Swift can be installed and is available on the following platforms:
But nionswift-tool cannot be installed as it is only specified for x64 Macs.

I do not know if Rosetta the transpiler can handle things like installed packages from conda, so I don't know if this is as simple as changing a flag to the conda upload as to which processors are supported, or it would require more work on your end, but it would be nice to be able to install Nion Swift on newer Macs.
Additional information after quick error checking w/ @Brow71189 :
Thanks!
The text was updated successfully, but these errors were encountered: