ModuleNotFoundError: No module named ‘_ssl‘

一、安装openssl

复制代码
wget http://www.openssl.org/source/openssl-1.0.2k.tar.gz
tar -xzf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k

./config --prefix=/usr/local/openssl
./config -t
make
make install

二、安装python(3.8.10为例)

复制代码
tar -zxvf Python-3.8.10.tgz
cd Python-3.8.10
vim Modules/Setup,解除注释206、210、211、212、213行,,解除注释后如下:
		'''
		_socket socketmodule.c
		
		# Socket module helper for SSL support; you must comment out the other
		# socket line above, and possibly edit the SSL variable:
		SSL=/usr/local/ssl
		_ssl _ssl.c \
			-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
			-L$(SSL)/lib -lssl -lcrypto
		'''
./configure --prefix=/usr/local/python38
make && make install
相关推荐
xujiangyan_2 小时前
linux的sysctl系统以及systemd系统。
linux·服务器·网络
吱吱企业安全通讯软件5 小时前
吱吱企业通讯软件保证内部通讯安全,搭建数字安全体系
大数据·网络·人工智能·安全·信息与通信·吱吱办公通讯
云边云科技6 小时前
零售行业新店网络零接触部署场景下,如何选择SDWAN
运维·服务器·网络·人工智能·安全·边缘计算·零售
rainFFrain7 小时前
Boost搜索引擎项目(详细思路版)
网络·c++·http·搜索引擎
AOwhisky7 小时前
Linux 文本处理三剑客:awk、grep、sed 完全指南
linux·运维·服务器·网络·云计算·运维开发
.Shu.8 小时前
计算机网络 HTTPS 全流程
网络协议·计算机网络·https
青草地溪水旁9 小时前
网络连接的核心机制
网络
花开富贵贼富贵9 小时前
计算机网络技术学习-day4《路由器配置》
网络·智能路由器·php
绵绵细雨中的乡音11 小时前
网络基础知识
linux·网络
还听珊瑚海吗12 小时前
基于WebSocket和SpringBoot聊天项目ChatterBox测试报告
spring boot·websocket·网络协议