pip gives error pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. in mac
The answers above was not working for me, any use of pip command was giving me the same error.
I finally solved the issue by re-installing the python3 using pyenv like below
pyenv install 3.7.0
# pyenv: /Users/devbhadurkhadka/.pyenv/versions/3.7.0 already exists
# continue with installation? (y/N) y
Thanks everyone for there answer
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Ubuntu 21.04 Python 3.8.10
libssl-dev
is required to build the ssl
module from source.
If you install Python from the package repositories, you will be installing a pre-built binary, so you won't need the openssl development files on your own machine, because these files are sort of 'baked-in' to the release.
But if you build Python from source yourself, you will need to install the libssl-dev
(openssl development files) package in order to build Python with the ssl
module.
You can check whether you have libssl-dev
installed by looking at the output of:
dpkg -s libssl-dev
If it is not installed, you can install it with (may require privileges e.g. sudo
):
apt-get install libssl-dev
If you then rebuild Python from source the ssl
module should be available.
NOTE: There are other dependencies too which might be missing and result in a less than fully-functional Python installation. Pay attention to the output you get when building. A (maybe incomplete) list of these dependencies' names in the Ubuntu repositories is: libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
How to fix pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available when installing Tensorflow?
Try running below command to fix this issue:
pip install --upgrade
pip install ssl
Please create an virtual_environment to install TensorFlow
in Anaconda
.
Follow below code to install TensorFlow
in virtual_environment:
conda create -n tf tensorflow #Create a Virtual environment(tf).
conda activate tf #Activate the Virtual environment
pip install tensorflow #install TensorFlow in it.
Note: You need to activate the virtual_environment each time you want to use TensorFlow.
Related Topics
How to Join Two Dataframes For Which Column Values Are Within a Certain Range
Schedule Python Script with Crontab
Python: Interplay Between Lib/Site-Packages/Site.Py and Lib/Site.Py
Get File Creation Time with Python on Linux
Python:Undefined Symbol: Pyunicodeucs2_Decodeutf8
How to Kill Zombie Processes Created by Multiprocessing Module
How to Download a Single File from Gitlab
Unsatisfiableerror While Installing Miniconda
Launch Default Image Viewer from Pygtk Program
Boolean Operators VS Bitwise Operators
Difference Between Venv, Pyvenv, Pyenv, Virtualenv, Virtualenvwrapper, Pipenv, etc
How to Push a Subprocess.Call() Output to Terminal and File
/Usr/Bin/Env: Python2: No Such File or Directory
Increasing a File's Size Using Mmap