我一直没有尝试在我的Xubuntu笔记本电脑上使用SublimeLinter-flake8
。我通过Anaconda发行版以及flake8
软件包安装了Python 3.7.7。我还使用了Sublime Text 3的Anaconda IDE插件,并且Anaconda的棉绒已关闭。
但是每当我在其中输入一些Python代码时,我都会不断收到相同的错误消息:
SublimeLinter: #1 flake8 <untitled 25> ERROR:
=============================================
Traceback (most recent call last):
File "/home/srdjan/anaconda3/bin/flake8", line 11, in <module>
load_entry_point('flake8==3.7.7', 'console_scripts', 'flake8')()
File "/home/srdjan/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 484, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/srdjan/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2714, in load_entry_point
return ep.load()
File "/home/srdjan/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2332, in load
return self.resolve()
File "/home/srdjan/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2338, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/srdjan/anaconda3/lib/python3.7/site-packages/flake8/main/cli.py", line 2, in <module>
from typing import List, Optional
File "/home/srdjan/anaconda3/lib/python3.7/site-packages/typing.py", line 1347, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/srdjan/anaconda3/lib/python3.7/site-packages/typing.py", line 1003, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry
奇怪的是,当我使用SublimeLinter-pycodestyle
和SublimeLinter-pyflakes
时,我遇到了一些类似的问题,其中pyflakes
会不断抛出这些奇怪的错误消息。我从来没有使它能够正常工作。
既然我已经有了pycodestyle
及其随附的pyflakes
插件,应该从笔记本电脑上卸载flake8
和SublimeLinter-flake8
吗?