mikelxc / Workarounds-for-ARM-mac

This repository describes how I get most of my configurations work on the new Apple Silicon Mac
GNU General Public License v3.0
500 stars 17 forks source link

Python3.9 Install #4

Open mwidjaja1 opened 3 years ago

mwidjaja1 commented 3 years ago

Hey I tried installing Python3.9 from an ARM Homebrew install at /opt/homebrew and while the install 'finished', the postinstall did not, crashing in these two places:

ModuleNotFoundError: No module named '_posixsubprocess' ModuleNotFoundError: No module named 'setuptools'

I'm just curious, did you do anything fancy when installing your Python3.9 to get it working?

drewwells commented 3 years ago

Yes, apply this delta locally and it will work https://github.com/Homebrew/homebrew-core/pull/65866/files . Looks like the longterm solution will take a bit to correct.

mwidjaja1 commented 3 years ago

Thanks for that tip, I'll try it out! I'm embarrassed to ask but uh... where do I modify that .rb file and how do I install from it? Do I just make a local copy straight up from the repo or is there a more proper answer?

Thanks!

drewwells commented 3 years ago

I just edit it in place. I think the default location of home-brew is /usr/local/homebrew... but they recommend using /opt/homebrew while things are being worked out. It's here on my computer /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb

drewwells commented 3 years ago

Homebrew will note that the file is out of sync and revert it on upgrades, which is a pain. You can remove git's index of the file if you're needing to upgrade python@3.9 a lot. I imagine a fix is coming soon.