我安装pylint了pip install pylint:Requirement already satisfied: pylint in c:\users\horseman.mini\appdata\roaming\python\python37\site-packages (2.5.3)Requirement already satisfied: toml>=0.7.1 in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from pylint) (0.10.1)Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from pylint) (0.4.1)Requirement already satisfied: isort<5,>=4.2.5 in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from pylint) (4.3.21)Requirement already satisfied: astroid<=2.5,>=2.4.0 in c:\users\horseman.mini\appdata\roaming\python\python37\site-packages (from pylint) (2.4.2)Requirement already satisfied: mccabe<0.7,>=0.6 in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from pylint) (0.6.1)Requirement already satisfied: lazy-object-proxy==1.4.* in c:\users\horseman.mini\appdata\roaming\python\python37\site-packages (from astroid<=2.5,>=2.4.0->pylint) (1.4.3)Requirement already satisfied: typed-ast<1.5,>=1.4.0; implementation_name == "cpython" and python_version < "3.8" in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from astroid<=2.5,>=2.4.0->pylint) (1.4.1)Requirement already satisfied: wrapt~=1.11 in c:\users\horseman.mini\appdata\roaming\python\python37\site-packages (from astroid<=2.5,>=2.4.0->pylint) (1.12.1)Requirement already satisfied: six~=1.12 in c:\users\horseman.mini\appdata\local\programs\python\python37\lib\site-packages (from astroid<=2.5,>=2.4.0->pylint) (1.13.0)但是当我在 directiy 中运行文件时,我想检查pylint text.py它是否写入$ pylint test.pybash: pylint: command not found我没有将 pylint 的路径添加到 PATH,因为我找不到它的路径。但是当我运行 python 并且import pylint它导入正常时。我怎么能从命令行运行pylint?
1 回答
一只萌萌小番薯
TA贡献1795条经验 获得超7个赞
任何 python 模块都可以运行,python -m MODULE
例如我总是使用python3 -m pip
,因为我永远无法设法让pip
别名为正确的版本工作😋。所以你可以用作pylint
:
python -m pylint test.py
添加回答
举报
0/150
提交
取消