Scrcpy: Can't execute ninja run

Created on 10 Mar 2018  路  5Comments  路  Source: Genymobile/scrcpy

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.
build

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.

All 5 comments

@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!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behzadpooldar picture behzadpooldar  路  4Comments

sennight picture sennight  路  3Comments

npes87184 picture npes87184  路  3Comments

udit7395 picture udit7395  路  4Comments

BloodPHamtOm picture BloodPHamtOm  路  3Comments