When running python -m pytype --config=".pytype.cfg" . we receive the below error. This is run by invoking docker run on a script that first runs pip install pytype==2020.5.7 and then runs the pytype validation, using an image with python3.7.
On installing pytype, ninja is also installed with the message WARNING: The script ninja is installed in '/home/kbuilder/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-locati.
How can we solve this?
Traceback (most recent call last):
Aug 25 15:43:49 File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
Aug 25 15:43:49 "__main__", mod_spec)
Aug 25 15:43:49 File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
Aug 25 15:43:49 exec(code, run_globals)
Aug 25 15:43:49 File "/home/kbuilder/.local/lib/python3.7/site-packages/pytype/__main__.py", line 10, in <module>
Aug 25 15:43:49 sys.exit(main())
Aug 25 15:43:49 File "/home/kbuilder/.local/lib/python3.7/site-packages/pytype/tools/analyze_project/main.py", line 97, in main
Aug 25 15:43:49 return runner.run()
Aug 25 15:43:49 File "/home/kbuilder/.local/lib/python3.7/site-packages/pytype/tools/analyze_project/pytype_runner.py", line 362, in run
Aug 25 15:43:49 ret = self.build()
Aug 25 15:43:49 File "/home/kbuilder/.local/lib/python3.7/site-packages/pytype/tools/analyze_project/pytype_runner.py", line 353, in build
Aug 25 15:43:49 return subprocess.call(command)
Aug 25 15:43:49 File "/usr/lib/python3.7/subprocess.py", line 323, in call
Aug 25 15:43:49 with Popen(*popenargs, **kwargs) as p:
Aug 25 15:43:49 File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
Aug 25 15:43:49 restore_signals, start_new_session)
Aug 25 15:43:49 File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
Aug 25 15:43:49 raise child_exception_type(errno_num, err_msg, err_filename)
Aug 25 15:43:49 FileNotFoundError: [Errno 2] No such file or directory: 'ninja': 'ninja'