Python Install - compile from source with SSL module, pip TLS/ SSL - Debian, Ubuntu

preview_player
Показать описание
0:00 - here, I'll first demonstrate a pip warning when Python is configured without the SSL module

1. if you are installing Python from scratch then follow this step by step guide
------------------------------
4:15 - install dependent libraries with sudo apt
11:05 - download the Python source file and unpack to a directory
17:22 - check any Python versions that are currently installed
28:56 - run configure with SSL enabled to create a Makefile
33:17 - run make to compile Python
39:43 - test your different Python versions and validate the SSL module is working for pip

2. if you are installing Python from scratch and prefer to run an automated script then I'll walk you a script that I've written
Note: I've split the script into functions and show how to run each function or all in one pass
------------------------------
50:37 - run script

3. if you have already compiled Python and you would like to fix the SSL warning then go directly to this chapter and I'll show you how
------------------------------
1:06:44 - recompile Python with SSL enabled

in my first Python install video I'd shown how to switch between Python versions using 'update-alternatives'

Рекомендации по теме
Комментарии
Автор

THANK YOU I tried fixing the SSL manually through first half of your video but was not successful. I then ran your script and then recompiled. It worked after that!!!! Thank you!!! BTW, I am new to Linux and Python. Your two videos were an enormous help. Thank you so much!!!

williamli
Автор

Wow you're a life saver. I had been battling this _ssl issue for the past day and I was getting no were very quickly. I probably looked over 30 websites and docs. Finally I decided to watch your very long but detailed video, which finally clicked a light on for me. So thank you.
I'm running on RHEL 7, but it was close enough.
What I figured out a few things I needed.
- yum install openssl-devel zlib-devel libffi-devel
- You must find the base path of ssl.h
find / -iname ssl.h -ls
/usr/include/openssl/ssl.h
- When you run configure, you just need to pass in with-openssl
./configure --enable-optimizations --with-openssl=/usr
That's all I needed. Thanks again.

brianwaganer
Автор

On redhat 7, I can't find openssl folder under include on usr/include.

On search I see files under /etc how do we solve this on Linux rhel 7

xcelcd
Автор

Hello I'm going through the same problem. Mine is the latest Python.
Python 3.10.4.
In session 26:17.
Locating d openssl in include folder.
Openssl is not in mine..
Don't know if thats gonna affect everything.
I'm following your step.
Please if there anything i still need to do. Pls reply

chrisify
Автор

Okay after still following the types. Checking for openssl and everything still says no.

chrisify
Автор

I have followed all the steps (from the beginning). I am not sure I understand the end of it. In your case, you were using Python 3.8.5 and you installed a previous version (3.7.5) in order to make corrections. Please, what did you do from the end of the video on? Could you please demonstrate that your step-by-step guide solved the problem? Should you choose 3.7.5 interpreter in VS Code and install things using pip normally? Would it be the same positive result if you use pip in Python's 3.8.5 version? After all, I think I am facing the same issues here because every time I use pip I still get the same error messages... :-(

rodrigofarah
Автор

Hello. Thaks a lot for!!!! I need your help

pablocosta
Автор

Hi, Thanks for tutorial & support. I'm having some issue, I can't find setup.dist on already installed python3.8 on digital ocean ubuntu server. You help will appreciated😊

SandeepYadav-hyeh
Автор

sudo apt install build-essential checkinstall zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev

OmarMendozaKS