Failed to build on macOS M1
MiaZhengLS opened this issue · 4 comments
The issue is something else based on your screenshot: Python is not found. I just tried cloning the repo and git lfs worked fine. Maybe there was a temporary issue with GitHub. I cannot reproduce the build issue with this freshly cloned copy on an Apple silicon Mac. Could you share what version of CMake and macOS are you using?
Thanks for the response!
Actually the "python isn't found" issue already occurred when I tried to execute cmake
. I had to tweak the command to
cmake ..
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
-DPYTHON_EXECUTABLE:FILEPATH=which python
, otherwise it will throw Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
. FYI I found this solution here https://stackoverflow.com/a/48241814. Even though I'm not 100% sure if this really solves the issue since I still got warnings in executing the aforementioned command.
python3 works on my machine and it resides in /usr/bin/python3
.
Another two things I'm not sure if they're correlated with the issue:
- I created a fork from this repo and cloned the fork to my local machine.
- I executed
git lfs init
and tried other git lfs commands (after I found nothing is in theweights
folder) after I cloned with the normal git command.
I could reproduce the issue if Homebrew with its own Python wasn't installed. This has been fixed in v2.1.0
.