【发布时间】:2021-02-11 19:17:57
【问题描述】:
尝试在我在 github 上的构建中运行 pylint 操作,但它说找不到 pylint。
代码
linting:
name: PyLint
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- run: pip3 install -U pip setuptools
- run: pip3 install -U -r requirements.txt
- run: export PATH=/home/runner/.local/bin/$PATH
- run: pylint --rcfile=.pylintrc src/
错误
Run pylint --rcfile=.pylintrc src/
/home/runner/work/_temp/44ccfc48-998a-405a-b25a-20b24f532ea1.sh: line 1: pylint: command not found
Error: Process completed with exit code 127.
当我在 pip install 上收到此消息时,我尝试将其添加到我的 PATH 中
WARNING: The scripts epylint, pylint, pyreverse and symilar are installed in '/home/runner/.local/bin' which is not on PATH.
但这并没有解决问题。
【问题讨论】:
-
你在 requirements.txt 中有 pylint 吗?
-
是的 pylint==2.6.0 并且它被安装在 pip install 的日志中
-
这是一个错字:
export PATH=/home/runner/.local/bin/$PATH——应该是export PATH=/home/runner/.local/bin/:$PATH(注意:)
标签: python git github github-actions pylint