When I use the command ninja run in the scrcpy/x folder, it gives me the following error. I'm on mac OSX High Serria
[0/1] Running external command run.
Traceback (most recent call last):
File "/usr/local/Cellar/meson/0.45.0/libexec/bin/meson", line 17, in <module>
from mesonbuild import mesonmain, mesonlib
ModuleNotFoundError: No module named 'mesonbuild'
FAILED: meson-run
/usr/local/Cellar/python/3.6.4_3/bin/python3.6 /usr/local/Cellar/meson/0.45.0/libexec/bin/meson --internal commandrunner /Users/vincent/scrcpy /Users/vincent/scrcpy/x '' /usr/local/Cellar/python/3.6.4_3/bin/python3.6 /usr/local/Cellar/meson/0.45.0/libexec/bin/meson scripts/run-scrcpy.sh
ninja: build stopped: subcommand failed.
@vincent-paing
I came across the same issue yesterday.
It seems the python 3.6 causes meson failure. See also this reported issue on homebrew.
You can reinstall python3 with another version (e.g. 3.5.2_3), and then reinstall meson again.
Then it's good to go.
@rayworks that's too bad. I'll wait till the bug got fixed on homebrew
I had the same problem, but managed to fix it without downgrading python. I've followed @rayworks's link to the issue on homebrew and found a fix in a comment there: https://github.com/Homebrew/homebrew-core/issues/8418#issuecomment-371926683
Turns out, I was victim of another issue caused by brew installs on Mac OS High Sierra not allowing for chown to be called on /usr/local directory. I recently upgraded from Yosemite to High Sierra and this was the first time using homebrew since.
While attempting to install meson, one of the dependencies (python) required symlinking into the non existent /usr/local/Frameworks directory. When this failed, I was still getting a successful response to python being installed so I didn't notice it at first.
To fix, I had to manually create the Frameworks directory with correct ownership set to my current user and then reinstall python and meson via brew. Once I did that, this error stopped appearing.
I remembered having the same problem with /usr/local/Frameworks, so I fixed that and now ninja run works!
https://github.com/Genymobile/scrcpy/issues/25#issuecomment-372098846
didn't work for me :(
For me, Python 3.6 was installed under root Library/Frameworks folder, I chmod it to allow read/write, and then run chown to change permission. After that, I start the setup process from the beginning. It's working flawlessly for me now.
Most helpful comment
@vincent-paing
I came across the same issue yesterday.
It seems the python 3.6 causes meson failure. See also this reported issue on homebrew.
You can reinstall python3 with another version (e.g. 3.5.2_3), and then reinstall meson again.
Then it's good to go.