centos7 python3.12.1 报错 No module named _ssl

https://blog.csdn.net/Amio_/article/details/126716818

安装python

复制代码
cd /usr/local/src
wget https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz
tar -zxvf Python-3.12.1.tgz
cd Python-3.12.1/
./configure -C --enable-shared --with-openssl=/usr/local/openssl --with-openssl-rpath=auto --prefix=/usr/local/python3
# 调试用: ./configure -C --with-openssl=/usr/local/openssl --with-openssl-rpath=auto --prefix=/usr/local/python3 2>&1 | tee configure.log
make -j8
# 调试用: make 2>&1 | tee make.log
make altinstall
# 调试用: make altinstall 2>&1 | tee install.log
ln -s /usr/local/python3/bin/python3.12 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.12 /usr/bin/pip3
ln -s /usr/local/python3/bin/python3.12-config /usr/bin/python3-config
python3 -V

CentOS 7升级gcc版本 _

相关推荐
李星星BruceL18 小时前
Pytest第三章(参考指南1)
python·自动化·pytest
哎呀呦呵18 小时前
pytest基本使用
python·pytest
阿关@18 小时前
Vscode中Python无法将pip/pytest”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
vscode·python·pip
Kristen_YXQDN18 小时前
PyCharm 中 pytest 运行 python 测试文件报错:D:\Python_file\.venv\Scripts\python.exe: No module named pytest
运维·开发语言·python·pycharm·pytest
Low--Key18 小时前
pytest框架快速入门
python·自动化·pytest
IMPYLH18 小时前
Lua 的 Debug(调试) 模块
开发语言·笔记·python·单元测试·lua·fastapi
普通网友18 小时前
更优雅的测试:Pytest框架入门
jvm·数据库·python
Beaman102418 小时前
pytest框架
python·pytest
咋吃都不胖lyh18 小时前
python -m venv(Python 内置虚拟环境工具)和 conda create(Anaconda/Miniconda 环境管理工具)
python·环境