Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Last active May 11, 2026 19:14
Show Gist options
  • Select an option

  • Save gregjhogan/021518aa9bbdbf05d77479144b457108 to your computer and use it in GitHub Desktop.

Select an option

Save gregjhogan/021518aa9bbdbf05d77479144b457108 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 upgrade pyOpenSSL and cryptography
# python3-openssl is broken on ubuntu 20.04 (incompatible with python3-cryptography)
# remove these apt packages without removing their dependencies
# install latest version of these packages into system python
# then after re-installing the apt packages the pip installed packages are still used
sudo apt-get install -y python3-pip
sudo dpkg -r --force-depends python3-openssl python3-cryptography
sudo pip3 install pyopenssl cryptography
sudo apt-get install -y --fix-missing python3-openssl python3-cryptography
@schweini

Copy link
Copy Markdown

Thank you so much! This fixed the error
"AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'"
when doing anything with python3 pip under wsl!

@erikao

erikao commented May 11, 2026

Copy link
Copy Markdown

Just wanted to add another note of thanks. This solved my issue with python3 too!!

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