gm.py x64.release Errorr---env: python: No such file or directory

845 views Asked by At

macos monterey 12.3.1

python -V: python3

which python3: /usr/local/bin/python3

alias python="/usr/bin/python3"

path: /Users/Bill/Public/browser/depot_tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin

proxy: proxychains4 + tor socks5 127.0.0.1 9150

cloned dedepot_tools in git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

run gclient working good

run: fetch v8

run: gclient sync working good

run: tools/dev/gm.py x64.release

show: env: python: No such file or directory

how to fix it?

should install python-is-python3?

brew info python-is-python3

Error: No available formula with the name "python-is-python3". Did you mean [email protected]?

1

There are 1 answers

1
jmrk On BEST ANSWER

As a short-term workaround, you have two options:

(1) Create a symlink python in your $PATH that references python3. This can be done in one of several ways:

  • Some Linux distros have a python-is-python3 package for that
  • Some distros have other "official" ways to do it
  • Or you can just sudo ln -s /usr/local/bin/python3 /usr/local/bin/python (or whatever the correct paths are on your system).

(2) You can call gm.py with an explicit Python binary: python3 tools/dev/gm.py

Medium-term, gm.py should be updated to require python3 directly. The fact that it doesn't do so yet is an artifact of the Python2-to-Python3 migration.