python报错:Python 2.7 will reach the end of its life on January 1st, 2020.

  • 环境描述
  • 错误描述
  • 解决办法

环境描述

  • centos 7

错误描述

在使用centos7的时候,使用pip安装的时候,可能会报错:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

是由于centos7默认安装了python2.7,但是python2.7的生命周期到2020年1月1日就会结束,所以是使用不了pip进行安装的。

解决办法

解决方法就是将python2升级为python3,推荐使用此链接的方法进行安装升级:cnblogs.com,已经测试实现过,确认解决有效。
    注意:更改之后,执行python文件时,需要把头部的代码更改如下:

# 更改前
# !/usr/bin/python# 更改后
# !/usr/bin/python3

python报错:Python 2.7 will reach the end of its life on January 1st, 2020.相关推荐

  1. DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Pyt

    1. 安装python依赖包,主要是gcc编译环境 yum groupinstall "Development tools" -y 2.zlib解压缩包 yum install – ...

  2. DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade

    问题背景 解决方法 总结 阅读之前注意: 本文阅读建议用时:5min 本文阅读结构如下表: 项目 下属项目 测试用例数量 问题背景 无 0 解决方法 无 0 总结 无 0 问题背景 MacOS系统自带 ...

  3. Python 报错解决:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

    早上升级完pip,后报错如下: -> # pip install --upgrade pwntools /usr/local/lib/python2.7/dist-packages/pip/_v ...

  4. python 报错 IndentationError: expected an indented block SyntaxError: invalid character in identifie

    红色方框那里敲击一个空格就好! 输入要在全英情况下! 另外,还要注意括号的事情.括号别出错误! IndentationError: expected an indented block的报错: Syn ...

  5. Python安装库较慢问题,Python报错pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool解决方法

    本文参考:https://blog.csdn.net/sinat_26811377/article/details/99698807 出现问题 在安装第三方库的时候,Python报错pip._vend ...

  6. 解决Python报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 658: illegal multibyte

    解决Python报错–UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 658: illegal multibyte ...

  7. python报错UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xe8 in position 0 解决方案

    python报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 0 解决方案 参考文章: (1)python报 ...

  8. Python 报错 SyntaxError: invalid syntax 解决方法

    Python 报错 SyntaxError: invalid syntax 解决方法 参考文章: (1)Python 报错 SyntaxError: invalid syntax 解决方法 (2)ht ...

  9. python 报错 AttributeError: type object ‘datetime.datetime‘ has no attribute ‘datetime‘

    python报错:type object 'datetime.datetime' has no attribute 'datetime' 描述:在第一个python程序里还未报错,第二个程序完全复制过 ...

最新文章

  1. RavenDB FS 安装使用 介绍
  2. 人人可用的在线抠图,还是AI自动化的那种!北大校友的算法被玩出新高度
  3. python高级语法-高阶函数之map的使用方法
  4. 用计算机弹生僻字乐谱,生僻字 E调 (拇指琴卡林巴琴弹奏谱)_谱友园地_中国曲谱网...
  5. 1346. 检查整数及其两倍数是否存在 golang
  6. kinect内参数的标定
  7. c语言生成一个大素数,for语句计算输出10000以内最大素数怎么搞最简单??各位大神们...
  8. 实现jdbc连接mysql_Java JDBC连接MYSQL数据库教程(实现)
  9. seajs常用API整理
  10. php使用正则表达式标记标题,PHP正则表达式以匹配HTML标记a之外的关键字
  11. linux下ftp权限控制
  12. docker基础4--docker的命令
  13. Appfuse实践(一)——配置安装 转自http://www.donews.net/skyhero/archive/2004/12/17/205662.aspx...
  14. char在计算机中是什么作用,C语言中char的用法
  15. python之js破解qq邮箱登录
  16. 红蜘蛛10013端口被占用
  17. 使用Xmanger/Xbrowser 远程桌面Ubuntu 12.04 LTS
  18. linux需要安装杀病毒软件,我在Linux上需要安装反病毒软件吗?
  19. 成功解决3dmax打开或导入模型文件的时候,出现文件打开失败
  20. win10注册ocx控件的步骤(包含错误处理方法0x80040200)

热门文章

  1. 【sfu】sdp和扩展的修改和对比
  2. 经济统计学专业学C语言,2019经济统计学专业怎么样、学什么、前景好吗
  3. Ubuntu清除缓存
  4. 共享打印机显示计算机权限,w10系统共享打印机怎么开权限_w10系统共享打印机访问权限如何获取...
  5. 链路追踪-Google-Dapper论文翻译总结
  6. 计算机设备驱动器空白文档,最新Wmdunh计算机基础知识(有试题和答案).docx
  7. 无缝衔接的人会遭报应吗_恋爱中,无缝对接的都是垃圾吗?
  8. 上班族适合的兼职副业,副业做什么比较靠谱,副业赚钱的路子有哪些
  9. 【PSO】熟悉PSO算法
  10. SD-WAN — MPLS 广域网 VPN 技术解析