Skip to content
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

The app can't run on Mac M1 #15

Open
anhdq1801 opened this issue Nov 7, 2021 · 4 comments
Open

The app can't run on Mac M1 #15

anhdq1801 opened this issue Nov 7, 2021 · 4 comments

Comments

@anhdq1801
Copy link

The app can't run on Mac M1, can you make it run on mac M1.

Thank you!

@joshuataylor
Copy link

As this is a Python script, you can run this on Apple Silicon (M1/M2) with a little bit of work. The below instructions will also work on Intel macs as well, though you probably want to run just the file from the Releases.

I recommend you have a basic understanding of how to use Terminal, as this will makes things a bit easier.

If you don't have Homebrew already installed.. install it :). Install homebrew

  1. Open Terminal

  2. brew install libusb python3 tcl-tk python-tk

  3. Reopen Terminal. python3 --version should return Python 3.11.xxx, where xxx is a minor version.

As of April 2023, Python 3.11 is the current stable version of Python. Future versions, should work. If the below steps don't work with Python 3.12 etc, you can install Python 3.11 & Python-tk for Python3.11 via brew install [email protected] [email protected]. Then in the following steps, instead of using python3, use [email protected] to run Python 3.11.

  1. git clone the repository, cd into it:
git clone https://github.com/nh-server/fusee-interfacee-tk
cd fusee-interfacee-tk

If you have issues with this, you can also download this directly here, extract it then cd into it. Mac does come with Git, so it should work.

# Run the below steps only if Git doesn't clone, for whatever reason.
curl -L https://github.com/nh-server/fusee-interfacee-tk/archive/refs/heads/master.zip --output fusee-interfacee-tk.zip
unzip fusee-interfacee-tk.zip
cd fusee-interfacee-tk.zip
  1. python3 -m venv .venv

This creates a "virtual environment", which means that packages will be installed within this directory instead of system wide, which might cause conflicts and is a general PITA to deal with.

  1. Now we're going to install the needed Python packages:
./.venv/bin/pip install pyusb

You can also usesource .venv/bin/activate, which activates a "virtual environment". But as we are just running a couple of steps, prefixing our commands with .venv/bin/ is fine.

  1. Now you can run the script, in future you should just be able to do this and not need steps 1-6:
./.venv/bin/python3 app.py

Copy+paste, once you have installed homebrew:

brew install libusb python3 tcl-tk python-tk
git clone https://github.com/nh-server/fusee-interfacee-tk
cd fusee-interfacee-tk
python3 -m venv .venv
./.venv/bin/pip install pyusb
./.venv/bin/python3 app.py

@cartazio
Copy link

cartazio commented Jun 5, 2023

same problem and same fix here :)

@vmiyoshi
Copy link

vmiyoshi commented Nov 8, 2023

tried fix from above on my M1 Mac doesn't work. I just get a blank python window label "tk"
App works without fail on Intel Mac's
% cd fusee-interfacee-tk
% ./.venv/bin/python3 app.py
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
2023-11-08 17:23:02.634 Python[11021:614039] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.`

@owensizemore
Copy link

After following @joshuataylor's instructions I still wasn't able to open the app, but using the mac-alt download instead got things to work for me. Not sure if any of the python/venv steps were actually neeed to get mac-alt to work, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants