【python】Linux升级版本

目的

迁移项目包路径到服务器上

查看服务器包是否和本地已有项目python版本相同然后发现~嗯不一样

项目上包时用的3.8~

服务器用的2.7

查看方法:

bash 复制代码
python -version

解决方案

一:项目所有包重新下载

二:升级服务器python版本

第二种步骤:

a. 更新包

bash 复制代码
sudo apt update

成功报错;

这个是啥额》简单说就是你机器没安装git

liunx 服务器安装git

如何安装:

Linux系统分为两种:

  • RedHat系列,包含Redhat、Centos、Fedora等

    RedHat系列的包管理工具是yum,

  • Debian系列,包含Debian、Ubuntu等

    Debian系列的包管理工具是apt-get

怎么知道自己什么系列:

查看:

bash 复制代码
cat /proc/version

接下来继续升级

bash 复制代码
sudo apt update
sudo apt install python3.8.0
sudo apt install python3.8.0-venv python3.8.0-dev
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8.0
python3 --version
相关推荐
兴趣使然黄小黄1 分钟前
【Pytest】Pytest框架快速入门
python·pytest
怪我冷i1 分钟前
wsl Ubuntu切换中科大源
linux·windows·ubuntu·ai编程·ai写作
FenceRain1 分钟前
Linux 使用脚本删除文件
linux
QT 小鲜肉2 分钟前
【Linux命令大全】001.文件管理之chgrp命令(实操篇)
android·linux·运维·笔记
qq13267029402 分钟前
grafana 未授权访问漏洞设置iptables指定IP访问,拒绝其他所有IP
linux·服务器·网络·iptables·防火墙策略
春日见3 分钟前
ubuntu以前可以联网,突然无法上网了
linux·服务器·ubuntu·debug
曹牧3 分钟前
内部服务错误500
服务器·开发语言
dagouaofei3 分钟前
文档生成PPT到底快不快?PDF转PPT工具实测分析
python·pdf·powerpoint
while(1){yan}5 分钟前
HTTP的数据报格式
java·开发语言·网络·网络协议·http·青少年编程·面试
wuguan_6 分钟前
C#之List数组
开发语言·c#·list