makepanda: fix brew python location on apple silicon

This commit is contained in:
Open Toontown 2022-09-19 15:52:30 -04:00
parent c0887f457a
commit 0b97802e23
1 changed files with 4 additions and 1 deletions

View File

@ -2205,7 +2205,10 @@ def SdkLocatePython(prefer_thirdparty_python=False):
if not os.path.exists(py_fwx):
# Use Brew Python.
py_fwx = "/usr/local/opt/python@%s/Frameworks/Python.framework/Versions/%s" % (version, version)
if platform.machine() == 'arm64':
py_fwx = "/opt/homebrew/opt/python@%s/Frameworks/Python.framework/Versions/%s" % (version, version)
else:
py_fwx = "/usr/local/opt/python@%s/Frameworks/Python.framework/Versions/%s" % (version, version)
if not os.path.exists(py_fwx):
exit("Could not locate Python installation at %s" % (py_fwx))