AttributeError:“模块”对象没有属性“ get_default_folder”

时间:2019-06-10 07:37:27

标签: https centos

当我运行此命令来检查certbot版本时:

certbot -V

引发此错误:

Traceback (most recent call last):
  File "/usr/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2687, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2341, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2347, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 18, in <module>
    from certbot import account
  File "/usr/lib/python2.7/site-packages/certbot/account.py", line 21, in <module>
    from certbot import constants
  File "/usr/lib/python2.7/site-packages/certbot/constants.py", line 17, in <module>
    os.path.join(compat.get_default_folder('config'), 'cli.ini'),
AttributeError: 'module' object has no attribute 'get_default_folder'

Python版本:2.7.5

CentOS版本:CentOS Linux版本7.6.1810(核心)

哪里出了问题?我使用以下命令进行安装:

yum install certbot -y

0 个答案:

没有答案