User-Profile-Image
hankin
  • 5
  • 关于
  • 分类
    • 路由器
    • 电脑相关
    • 游戏相关
    • 未分类
    • 服务器相关
    • 数据库
  • 页面
    • 关于
  • 友链
    • 华夏网盟
Help?

Please contact us on our email for need any support

Support
  • 关于
    首页   ›   服务器相关   ›   正文
服务器相关

Linux安装python3.10与PIP

2023-08-11 14:51:00
275  0 0

本文使用Debian11系统。

apt update && apt upgrade -y
apt install wget build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
cd ~

wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz

tar -xzvf Python-3.10.0.tgz

cd Python-3.10.0

./configure --enable-optimizations
#默认安装路径为 /usr/local/bin

make -j6 altinstall
#使用6核心编译

验证安装

python3.10
检查版本输出。

切换Python版本

whereis python

只需要在该用户home目录下的 .bashrc 文件下新增 Alias 即可
vi ~/.bashrc

alias python=’/usr/local/bin/python3.10

键入pyhton检查版本输出。

安装PIP

wget https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python get-pip.py -i https://pypi.tuna.tsinghua.edu.cn/simple

键入pip -V查看输出

评论 (0)

Click here to cancel reply.

欢迎您 游客  

近期文章

  • 用于网速测试的下载测速文件合集
  • docker构建SB镜像
  • pterodactl docker install
  • OpenWRT流量实时监控插件
  • docker部署dify

近期评论

No comments to show.

归档

  • 1 月 2026
  • 8 月 2025
  • 5 月 2025
  • 4 月 2025
  • 3 月 2025
  • 2 月 2025
  • 12 月 2024
  • 4 月 2024
  • 10 月 2023
  • 8 月 2023
  • 4 月 2023
  • 3 月 2023
  • 2 月 2023
  • 10 月 2021
  • 5 月 2021
  • 3 月 2021
  • 2 月 2021

分类

  • 数据库
  • 服务器相关
  • 未分类
  • 游戏相关
  • 电脑相关
  • 路由器
Copyright © 2026
smarty_hankin 主题. Designed by hankin
主页
页面
  • 关于
博主
hkthomas 管理员
136 文章 0 评论 18311 浏览
测试
测试