Python3.10报错 No module named ‘_ssl‘

报错原因在编译python3.10的时候不存在ssl相关依赖包,因此在make$make install 时将ssl忽略了。
1.下载ssl依赖

apt-get install openssl
apt-get install libssl-dev

2.重新编译python

cd Python3.10.0
./configure --with-ssl
make
sudo make install

3.验证

python
import ssl

在这里插入图片描述

你可能感兴趣的:(报错整理,ssl,网络协议,网络)