question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formatting Not Working - M1 Macs (darwin/arm64) Unsupported

See original GitHub issue

For M1 Macs, the issue is the new Darwin architecture is missing. The architecture directory on this repository has not been updated in 7 years so I will also include a workaround:

  1. Run pip3 install pyastyle in your favorite pyenv. I have not confirmed the compatibility between the latest version of pyastyle and the one used in this 7 year old library so YMMV.
  2. Open the plugin’s pyastyle directory:
    open "~/Library/Application Support/Sublime Text/Packages/SublimeAStyleFormatter/pyastyle/python3"
    
  3. Create a new directory named _darwin.
  4. Create an empty __init__.py in the new _darwin directory.
  5. Link or Copy & Rename the darwin binary installed in step 1 to _darwin with the name pyastyle.so. If you pip3 installed this globally, this might be located in a path similar to: ~/Library/Python/3.8/lib/python/site-packages/pyastyle.cpython-38-darwin.so
  6. Modify "~/Library/Application Support/Sublime Text/Packages/SublimeAStyleFormatter/pyastyle/python3/__init__.py" to only include the following:
    try:
        from ._darwin.pyastyle import *
        platform = "MacOS X Darwin"
    except ImportError:
        raise ImportError("Could not find a suitable pyastyle binary for your platform and architecture.")
    

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bhushankorgcommented, Dec 14, 2022

Thanks you are a saviour, Now I can live peacefully!

1reaction
Yachintcommented, Mar 20, 2022

Thanks, works on the M1 chip now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot run debug Go using VSCode on Mac M1
Ensure your VSCode uses the arm64 version. (it can use a different go version from the system). Run Go: install/update tools.
Read more >
Template v2.2.0 does not have a package available - Mac M1
Hi Any idea how I can fix this error, when performing terraform init? template v2.2.0 does not have a package available for your...
Read more >
If an audio or video file doesn't play on Mac - Apple Support
Older or specialized media formats might not work in your app, because the format requires software designed to support it.
Read more >
How to run a Minikube on Apple Silicon M1 | by Sophie Kwon
sudo install minikube-darwin-arm64 /usr/local/bin/minikube ... Now you can see the minikube instance is running on your M1 Macbook.
Read more >
ODrivetool Install on M1 Mac (Apple silicon) - ODrive Community
Though the formatting of the errors is slightly different depending on the version it is the same base problem - libfibre is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found