Build fails: Python 2.X is deprecated in MacOS Monterey 12.3

Skip to first unread message

Christian Falch

Mar 30, 2022, 9:17:52 AMMar 30
to skia-discuss
After upgrading to MacOS Monterey 12.3 our Skia builds stopped working due to the deprecation of python 2 on MacOS. 

We're building with the M101 branch.

I managed to get almost everything to build again setting the script-executable to python3 when running `gn gen`:

gn gen out/android/arm   --script-executable=python3 --args='....

All our iOS builds are now working including building for Mac M1, but Android still fails complaining about python not being found when trying to link:

[1/104] link libwebp_sse41.a
FAILED: libwebp_sse41.a
python "<...>/externals/skia/gn/" "libwebp_sse41.a" && <...>/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar rcs libwebp_sse41.a @libwebp_sse41.a.rsp
/bin/sh: python: command not found

Any ideas on how to solve this? Thanks in advance :) 


Greg Daniel

Mar 30, 2022, 9:30:50 AMMar 30
to skia-discuss
Yeah Mac 12.3 removed 'python' and only has 'python3'. All of our tools should work with python3, but some things may still directly call 'python'. I made a bash script for python that has:

/usr/bin/python3 "$@"

So far that has solved all the issues I've had with tools and python.

You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Christian Falch

Mar 30, 2022, 9:33:28 AMMar 30
to skia-discuss
Nice, thanks!
Reply all
Reply to author
0 new messages