找回密码
 register

QQ登录

只需一步,快速开始

查看: 1635|回复: 0

[每天自学] python 3.5提示停止支持,升级最新版

[复制链接]

[每天自学] python 3.5提示停止支持,升级最新版

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:122
  • 打卡月天数:18
  • 打卡总奖励:121
  • 最近打卡:2025-02-22 14:24:44
Waylee

主题

0

回帖

1万

积分

仙帝

积分
14008
Waylee 2021-4-11 12:42 | 显示全部楼层 |阅读模式

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×
老系统Ubuntu16.04
执行pip3 install requests命令提示:DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.9.1)

声明:Python 3.5的使用寿命已于2020年9月13日到期。请升级您的Python,因为不再维护Python 3.5。 pip 21.0将于2021年1月删除对Python 3.5的支持。pip 21.0将删除对此功能的支持
Ubuntu中安装模块后发现python3.5.2已经不行了,要升级才能用某些模块了,就直接安装最新的版本吧。查了挺多资料,可能我环境有问题重装了很多次,终于找到成功的方法了。(有可能按照步骤做还是会出错)


1. 在终端中下载Python安装包:

2. 解压Python安装包
tar xzvf Python-3.9.4.tgz


3.进入python3.9
cd Python-3.9.0

4.在./configure之前设置字符集
export LC_ALL=zh_CN.UTF-8

5.编译文件  时间大概有1-3分钟
./configure --prefix=/usr/local/python3

6.编译好后,会有另外一个提示,让If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations。
./configure --enable-optimizations

7..安装
make && make install



8.新命令使用指定python运行pip
python3.9 -m pip install requests






您需要登录后才可以回帖 登录 | register

本版积分规则

雪舞知识库 | 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 |天天打卡

GMT+8, 2025-2-22 16:34 , Processed in 0.101281 second(s), 10 queries , Redis On.

Powered by XueWu Licensed

Copyright © Tencent Cloud.

快速回复 返回顶部 返回列表