我最近在Windows 7上安装了pylint,当我运行它时出现错误:
Error executing PyLint: Command failed with error=None, status=1; stderr:
Traceback (most recent call last):
File "C:\Python27\Scripts\pylint", line 3, in <module>
run_pylint()
File "c:\python27\lib\site-packages\pylint\__init__.py", line 20, in run_pylint
from pylint.lint import Run
File "c:\python27\lib\site-packages\pylint\lint.py", line 30, in <module>
from pylint.checkers import utils #pylint: disable=unused-import
文件“c:\ python27 \ lib \ site-packages \ pylint \ checkers__init __。py”,第47行, 从pylint.reporters导入diff_string 文件“c:\ python27 \ lib \ site-packages \ pylint \ reporter__init __。py”,第20行,in 来自pylint.utils导入MSG_TYPES 文件“c:\ python27 \ lib \ site-packages \ pylint \ utils.py”,第32行,in 来自astroid导入节点,Module ImportError:没有名为astroid的模块
我尽可能地遵循了安装说明,但似乎无法解决这个问题。
答案 0 :(得分:1)
使用此链接正确安装pip How do I install pip on Windows?
然后执行 pip install pylint
然后查看此说明http://docs.pylint.org/installation.html#note-for-windows-users