我的系统配置是-Windows 10 (64 bit), Python 3.5.0 (32 Bit)
我做了pip install pylint
并得到了:
Requirement already satisfied: mccabe<0.7,>=0.6 in c:\program files (x86)\python 3.5\lib\site-packages (from pylint) (0.6.1)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\program files (x86)\python 3.5\lib\site-packages (from pylint) (0.4.3)
Requirement already satisfied: isort<5,>=4.2.5 in c:\program files (x86)\python 3.5\lib\site-packages (from pylint) (4.3.21)
Requirement already satisfied: astroid<2.4,>=2.3.0 in c:\program files (x86)\python 3.5\lib\site-packages (from pylint) (2.3.3)
Requirement already satisfied: lazy-object-proxy==1.4.* in c:\program files (x86)\python 3.5\lib\site-packages (from astroid<2.4,>=2.3.0->pylint) (1.4.3)
Requirement already satisfied: wrapt==1.11.* in c:\program files (x86)\python 3.5\lib\site-packages (from astroid<2.4,>=2.3.0->pylint) (1.11.2)
Requirement already satisfied: six~=1.12 in c:\program files (x86)\python 3.5\lib\site-packages (from astroid<2.4,>=2.3.0->pylint) (1.13.0)
Requirement already satisfied: typed-ast<1.5,>=1.4.0; implementation_name == "cpython" and python_version < "3.8" in c:\program files (x86)\python 3.5\lib\site-packages (from astroid<2.4,>=2.3.0->pylint) (1.4.1)
Installing collected packages: pylint
Successfully installed pylint-2.4.4
然后,我执行pylint --version
,它使我跟随以下错误。我尝试搜索所有地方,但没有给出解决方法。
C:\>pylint --version
Traceback (most recent call last):
File "c:\program files (x86)\python 3.5\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files (x86)\python 3.5\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python 3.5\Scripts\pylint.exe\__main__.py", line 4, in <module>
File "c:\program files (x86)\python 3.5\lib\site-packages\pylint\__init__.py", line 16, in <module>
from pylint.pyreverse.main import Run as PyreverseRun
File "c:\program files (x86)\python 3.5\lib\site-packages\pylint\pyreverse\main.py", line 22, in <module>
from pylint.pyreverse.diadefslib import DiadefsHandler
File "c:\program files (x86)\python 3.5\lib\site-packages\pylint\pyreverse\diadefslib.py", line 22, in <module>
from pylint.pyreverse.diagrams import ClassDiagram, PackageDiagram
File "c:\program files (x86)\python 3.5\lib\site-packages\pylint\pyreverse\diagrams.py", line 16, in <module>
from pylint.checkers.utils import decorated_with_property
File "c:\program files (x86)\python 3.5\lib\site-packages\pylint\checkers\utils.py", line 626, in <module>
def is_attr_private(attrname: str) -> Optional[Match[str]]:
File "c:\program files (x86)\python 3.5\lib\typing.py", line 631, in __getitem__
return Union[arg, type(None)]
File "c:\program files (x86)\python 3.5\lib\typing.py", line 534, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "c:\program files (x86)\python 3.5\lib\typing.py", line 491, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "c:\program files (x86)\python 3.5\lib\typing.py", line 491, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
**TypeError: issubclass() arg 1 must be a class**