报错原因在编译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

报错原因在编译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