1
centosでnginxを使用します7.3
。Certbot:ImportError:モジュール名が 'requests.packages.urllib3'でない
私はhttps://certbot.eff.org/#centosrhel7-nginx
certbot --nginx
を実行しているときにエラーがあり、次のcertbotをインストール:
[[email protected] src]# certbot --nginx
Traceback (most recent call last):
File "/usr/bin/certbot", line 9, in <module>
load_entry_point('certbot==0.14.1', 'console_scripts', 'certbot')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 564, 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 2662, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/site-packages/certbot/main.py", line 14, in <module>
from certbot import account
File "/usr/lib/python2.7/site-packages/certbot/account.py", line 17, in <module>
from acme import messages
File "/usr/lib/python2.7/site-packages/acme/messages.py", line 4, in <module>
from acme import challenges
File "/usr/lib/python2.7/site-packages/acme/challenges.py", line 10, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 95, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'
パッケージ:
[[email protected] src]# pip list
acme (0.14.1)
backports.ssl-match-hostname (3.4.0.2)
certbot (0.14.1)
certifi (2017.7.27.1)
cffi (1.6.0)
chardet (3.0.4)
Cheetah (2.4.4)
cloud-init (0.7.6)
ConfigArgParse (0.11.0)
configobj (4.7.2)
cryptography (1.3.1)
decorator (3.4.0)
enum34 (1.0.4)
future (0.16.0)
idna (2.6)
iniparse (0.4)
ipaddress (1.0.16)
IPy (0.75)
Jinja2 (2.9.6)
jsonpatch (1.16)
jsonpointer (1.10)
kitchen (1.1.1)
Markdown (2.6.8)
MarkupSafe (1.0)
mock (1.0.1)
ndg-httpsclient (0.3.2)
oauth (1.0.1)
parsedatetime (1.5)
perf (0.1)
pip (9.0.1)
ply (3.4)
policycoreutils-default-encoding (0.1)
prettytable (0.7.2)
psutil (2.2.1)
pyasn1 (0.1.9)
pycparser (2.14)
pycurl (7.19.0)
pygobject (3.14.0)
pygpgme (0.3)
pyliblzma (0.5.3)
pyOpenSSL (0.13.1)
pyparsing (1.5.6)
pyRFC3339 (1.0)
python2-pythondialog (3.3.0)
pytz (2012d)
pyudev (0.15)
pyxattr (0.5.1)
PyYAML (3.12)
requests (2.18.4)
seobject (0.1)
sepolicy (1.1)
setuptools (36.2.7)
six (1.9.0)
slip (0.4.0)
slip.dbus (0.4.0)
urlgrabber (3.10)
urllib3 (1.22)
yum-axelget (1.0.4)
yum-metadata-parser (1.1.4)
zope.component (4.1.0)
zope.event (4.0.3)
zope.interface (4.0.5)
私は何をすべき?
は 'ピップ要求urllib3 --force --upgrade'をインストールし、それが助けかどうかを確認して実行してみてください持っていました –