Home > Backend Development > Python Tutorial > Why is my pip3 installation failing with an \'ssl module unavailable\' error?

Why is my pip3 installation failing with an \'ssl module unavailable\' error?

DDD
Release: 2024-12-05 22:44:11
Original
909 people have browsed it

Why is my pip3 installation failing with an

"Python 'ssl' module unavailable" during package installation with pip3

Encountering the error "SSL related error: Can't connect to HTTPS URL because the SSL module is not available" when installing packages using pip3 indicates an issue with the 'ssl' module's availability in Python. To resolve this, follow these steps:

Install Python 3.6 and pip3 in Ubuntu:

  1. Install essential packages: sudo apt-get install build-essential libffi-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
  2. Download "Python-3.6.8.tar.xz" from the official Python website and extract it to your home directory.
  3. Navigate to the extracted directory and run: ./configure
  4. Compile and install: make && sudo make install
  5. Install packages using: pip3 install package_name

Note: This guide applies to Ubuntu versions prior to 20.04 LTS.

The above is the detailed content of Why is my pip3 installation failing with an \'ssl module unavailable\' error?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template