我已经用 pip 安装了 bandit,但是当我bandit --help
在命令行中运行时,我收到以下错误:
Traceback (most recent call last):
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/bin/bandit", line 5, in <module>
from bandit.cli.main import main
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/__init__.py", line 19, in <module>
from bandit.core import config # noqa
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/core/__init__.py", line 17, in <module>
from bandit.core import config # noqa
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/core/config.py", line 12, in <module>
from bandit.core import extension_loader
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/core/extension_loader.py", line 109, in <module>
MANAGER = Manager()
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/core/extension_loader.py", line 27, in __init__
self.load_blacklists(blacklists_namespace)
File "/home/alipqb/.local/share/virtualenvs/django_with_pytest-FUuC6zdm/lib/python3.8/site-packages/bandit/core/extension_loader.py", line 78, in load_blacklists
for val in six.itervalues(self.blacklist):
AttributeError: module 'six' has no attribute 'itervalues'
另外我应该提到它bandit
在路径中并且没有问题。
我应该怎么办?