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版本 _

在这里插入图片描述

相关推荐

  1. centos 7 使用dnf

    2024-03-14 22:36:02       18 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-14 22:36:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-14 22:36:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-14 22:36:02       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-14 22:36:02       20 阅读

热门阅读

  1. LeetCode 1768. 交替合并字符串

    2024-03-14 22:36:02       17 阅读
  2. linux常用命令2

    2024-03-14 22:36:02       18 阅读
  3. 微信小程序-npm扩展工具包

    2024-03-14 22:36:02       21 阅读
  4. mapperXML标签总结

    2024-03-14 22:36:02       18 阅读
  5. 基于Node.js 和 FFmpeg构建自动化脚本用来转码视频

    2024-03-14 22:36:02       20 阅读
  6. 重拾C++之菜鸟刷算法第11篇---回溯算法(上)

    2024-03-14 22:36:02       20 阅读
  7. vue中双向数据绑定v-model的理解

    2024-03-14 22:36:02       19 阅读
  8. 个人信息方便后续使用

    2024-03-14 22:36:02       18 阅读