PyType在忍者依赖上失败

问题描述

运行python -m pytype --config=".pytype.cfg" . 时,我们收到以下错误。这是通过调用docker运行在脚本上运行的,该脚本首先运行pip install pytype==2020.5.7,然后使用带有python3.7的图像运行pytype验证。

在安装pytype时,还会安装忍者消息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

我们如何解决这个问题?

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'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)