Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg_resources.DistributionNotFound: The 'urllib3<1.23,>=1.21.1' distribution was not found and is required by requests #5465

Closed
richerdyoung opened this issue Jan 24, 2018 · 9 comments

Comments

@richerdyoung
Copy link

richerdyoung commented Jan 24, 2018

error message:

pkg_resources.DistributionNotFound: The 'urllib3<1.23,>=1.21.1' distribution was not found and is required by requests 

system version message

linux  centos7   nginx

[root@izuf6gjb9m90kz88rvhbykz local]# sudo certbot --authenticator webroot --installer nginx Traceback (most recent call last): File "/bin/certbot", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3138, in <module> @_call_aside File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3122, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 679, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 867, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'urllib3<1.23,>=1.21.1' distribution was not found and is required by requests [root@izuf6gjb9m90kz88rvhbykz local]#

@SwartzCr
Copy link
Contributor

How did you install certbot?
Have you installed any python packages system wide via pip? (you can run pip freeze to see all libraries installed via pip)

@mouse07410
Copy link

I have exactly the same problem on MacOS High Sierra with python-2.7.15 and 3.6.5.

@colinleefish
Copy link

Same here.

Tried to install certbot from EPEL, no luck.

Tried to install with pyenv (pip install certbot), no luck even if urllib3 is indeed install and version requirement is met.

Traceback (most recent call last):
  File "/usr/bin/certbot", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3112, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3096, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3125, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 580, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 593, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 781, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'urllib3<1.24,>=1.21.1' distribution was not found and is required by requests

@birbird
Copy link

birbird commented Dec 11, 2018

Exactly the same problem

Fixed by

pip uninstall urllib3
pip uninstall requests
pip uninstall chardet

pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3

@aaaaasam
Copy link

Fixed by

pip uninstall urllib3
pip uninstall requests
pip uninstall chardet
yum remove python-requests
yum remove python-urllib3
pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3
yum install certbot

@kouyifan
Copy link

@birbird thanks ,its working

@stale
Copy link

stale bot commented Aug 13, 2020

We've made a lot of changes to Certbot since this issue was opened. If you still have this issue with an up-to-date version of Certbot, can you please add a comment letting us know? This helps us to better see what issues are still affecting our users. If there is no activity in the next 30 days, this issue will be automatically closed.

@stale stale bot added the needs-update label Aug 13, 2020
@stale
Copy link

stale bot commented Sep 12, 2020

This issue has been closed due to lack of activity, but if you think it should be reopened, please open a new issue with a link to this one and we'll take a look.

@stale stale bot closed this as completed Sep 12, 2020
@ethode
Copy link

ethode commented Sep 18, 2020

Unfortunately I am experiencing the same issue still.

CentOS 7.7

  • Base and EPEL enabled.

I've tried installed via EPEL or from base directly.

[root@my home ]$ certbot --version
Traceback (most recent call last):
File "/bin/certbot", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 3241, in
@_call_aside
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 585, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'urllib3<1.25,>=1.21.1' distribution was not found and is required by requests

I have tried all the suggestions on this thread and many others with no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants