# pkg\_resources.ContextualVersionConflict: urllib3 2.0.3

**URL:** <https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987>\
**Category:** Help\
**Created:** [September 11, 2023, 7:04pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987 "2023-09-11T19:04:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy-werderman](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/andy-werderman/32/73414_2.png) [@andy-werderman](https://community.letsencrypt.org/u/andy-werderman)\
**Post date:** [September 11, 2023, 7:04pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/1 "2023-09-11T19:04:15Z")

</div>

I am unable to run certbot after running `brew install certbot`

My domain is:  
`equinox.com`

I ran this command:  
`brew install certbot`  
`certbot -v`

It produced this output:

```plaintext
An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (urllib3 2.0.3 (/usr/local/Cellar/certbot/2.6.0_1/libexec/lib/python3.11/site-packages), Requirement.parse('urllib3<1.27,>=1.25.4'), {'botocore'})
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/folders/gp/b7z3rfpn4v75bs_xkg4xzpj5ysczwg/T/certbot-log-6orjt2ey/log or re-run Certbot with -v for more details.

```

My web server is (include version):  
I am not using certbot to install the certificate on a web server - just to renew a certificate locally.

The operating system my web server runs on is (include version):  
macOS Ventura 13.5.2

I can login to a root shell on my machine (yes or no, or I don't know):  
yes

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):  
`certbot brew install` output:

```plaintext
brew install certbot
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/certbot/manifests/2.6.0_1-3
Already downloaded: /Users/awerderman/Library/Caches/Homebrew/downloads/1dfb57e5521dbd81a4471b35b94a1bc0ecd7d858e754399ad79243058a1c5eec--certbot-2.6.0_1-3.bottle_manifest.json
==> Fetching certbot
==> Downloading https://ghcr.io/v2/homebrew/core/certbot/blobs/sha256:d7f056e3bb0385653713c127931f85c02f352ce0a810c4183e7c814f4a58b599
Already downloaded: /Users/awerderman/Library/Caches/Homebrew/downloads/3c576cf8f011f8bfdc971e8ee3efc212e746bc0ce859c7cea434fe5539731b0c--certbot--2.6.0_1.ventura.bottle.3.tar.gz
==> Pouring certbot--2.6.0_1.ventura.bottle.3.tar.gz
🍺 /usr/local/Cellar/certbot/2.6.0_1: 760 files, 5MB
==> Running `brew cleanup certbot`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

```

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [September 11, 2023, 7:12pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/2 "2023-09-11T19:12:29Z")

</div>

The error is from the Python package `botocore` which is a dependency of the `certbot-dns-route53` plugin. Maybe it would suffice to reinstall that plugin (assuming you're using it), otherwise I'm enclined to say you'd need to file this issue at the Homebrew people.

---

<div class="post-metadata">

**Author:** ![andy-werderman](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/andy-werderman/32/73414_2.png) [@andy-werderman](https://community.letsencrypt.org/u/andy-werderman)\
**Post date:** [September 11, 2023, 7:37pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/3 "2023-09-11T19:37:38Z")

</div>

I missed that the `certbot-dns-route53` plugin is being managed by Pip while Certbot is managed by Homebrew. Upgrading the plugin worked. Thank you!

Edit: even with upgrading everything, I had to make sure `urllib3` is set at `1.26.16`. Note this error message:

```plaintext
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
botocore 1.31.45 requires urllib3<1.27,>=1.25.4, but you have urllib3 2.0.4 which is incompatible.

```

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [September 11, 2023, 7:40pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/4 "2023-09-11T19:40:42Z")

</div>

And with "upgrading", just for the record, I hope you mean uninstalled using `pip` and reinstalled using Homebrew?

---

<div class="post-metadata">

**Author:** ![andy-werderman](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/andy-werderman/32/73414_2.png) [@andy-werderman](https://community.letsencrypt.org/u/andy-werderman)\
**Post date:** [September 11, 2023, 7:50pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/5 "2023-09-11T19:50:49Z")

</div>

I didn't know that was an option for these extended plugins. From what I've seen, that isn't an option right now.

> [@Plugin certbot-dns-route53 doesn't exist on brew (OSX)](https://community.letsencrypt.org/t/plugin-certbot-dns-route53-doesnt-exist-on-brew-osx/183294/4):
>
> …

> <https://github.com/certbot/certbot/issues/5680>
>
> \## My operating system is (include version): macOS High Sierra 10.13.3
> 
> \## I i…nstalled Certbot with (certbot-auto, OS package manager, pip, etc): \`homebrew\`
> 
> \## I ran this command and it produced this output: \`certbot plugins\`
> 
> \`\`\`
> \-------------------------------------------------------------------------------
> \* apache
> Description: Apache Web Server plugin - Beta
> Interfaces: IAuthenticator, IInstaller, IPlugin
> Entry point: apache = certbot\_apache.entrypoint:ENTRYPOINT
> 
> \* nginx
> Description: Nginx Web Server plugin - Alpha
> Interfaces: IAuthenticator, IInstaller, IPlugin
> Entry point: nginx = certbot\_nginx.configurator:NginxConfigurator
> 
> \* standalone
> Description: Spin up a temporary webserver
> Interfaces: IAuthenticator, IPlugin
> Entry point: standalone = certbot.plugins.standalone:Authenticator
> 
> \* webroot
> Description: Place files in webroot directory
> Interfaces: IAuthenticator, IPlugin
> Entry point: webroot = certbot.plugins.webroot:Authenticator
> \-------------------------------------------------------------------------------
> \`\`\`
> 
> \## Certbot's behavior differed from what I expected because:
> 
> \`dns-route53\` and other plugins found in the master branch were not available.
> 
> Discussion on Homebrew/homebrew-core/issues/18227 suggests that the Homebrew maintainers have an objection to the dependency management that would be required to solve this completely on their end.

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [September 11, 2023, 8:03pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/6 "2023-09-11T20:03:19Z")

</div>

Oh, that's a bummer.

Because using `pip` to install packages _globally_ is a recipe for disaster with conflicting dependencies all around..

Ah well, at least you know where to look in the future 🙂

That Github issue does mention some good ways to install the plugins into the Certbot `venv` made by Homebrew though. That would I guess be the "best next thing" compared to installing the plugin globally.

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [September 11, 2023, 8:12pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/7 "2023-09-11T20:12:19Z")

</div>

Or, maybe use an ACME Client that is not based on python?

Would a BASH client work? If so, acme.sh is popular

> **[ACME Client Implementations - Let's Encrypt](https://letsencrypt.org/docs/client-options/)**
>
> Last updated: Jul 22, 2023 | See all Documentation Let’s Encrypt uses the ACME protocol to verify that you control a given domain name and to issue you a certificate. To get a Let’s Encrypt certificate, you’ll need to choose a piece...

---

<div class="post-metadata">

**Author:** ![andy-werderman](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/andy-werderman/32/73414_2.png) [@andy-werderman](https://community.letsencrypt.org/u/andy-werderman)\
**Post date:** [September 11, 2023, 8:48pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/8 "2023-09-11T20:48:07Z")

</div>

My use case is a one-off. 99% of the time I am using certbot in a container, but ran into this issue locally. Those are all good suggestions though. I appreciate the quick help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [October 11, 2023, 8:48pm UTC](https://community.letsencrypt.org/t/pkg-resources-contextualversionconflict-urllib3-2-0-3/204987/9 "2023-10-11T20:48:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
