python ubuntu 服务_部署一个Python爬虫环境(六)-ubuntu版_升级现有服务器系统篇...

一,更新Ubuntu系统 ——https://www.cnblogs.com/wucaiyun1/p/13406258.html

1)查看当前版本:

lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu14.04.4LTS

Release:14.04Codename: trusty

2)执行更新:

sudo apt-getupdate

sudo apt-getupgrade

sudo apt-get dist-upgrade #可选

3)重启系统:

sudo reboot

4)升级系统:

do-release-upgrade

Note:升级会从14.04->16.04->18.04,不会一步完成!

5)升级完成:

Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-136-generic x86_64)* Documentation: https://help.ubuntu.com

* Management: https://landscape.canonical.com

* Support: https://ubuntu.com/advantage

Last login: Fri Feb 5 20:34:35 2021 from 192.168.17.2root@Server:~# python3 --version

Python3.6.9

6)按照(四)中的步奏配置

补充:https://blog.csdn.net/antkengelephant/article/details/84935617;

https://www.jianshu.com/p/e73b5731d334; +(sudo apt-get autoclean python2.7)+‘/usr/local/lib’文件夹和子文件夹下删除pip+python2.7

pip安装完成:

root@Server:~# pip3 --version

pip9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Mitmproxy安装完成:

root@XiakeAndroidServer:~# mitmproxy --version

Mitmproxy:5.3.0Python:3.6.9OpenSSL: OpenSSL1.1.1h 22 Sep 2020Platform: Linux-4.15.0-136-generic-x86_64-with-Ubuntu-18.04-bionic

protobuf安装完成:

Successfully installed pyprotobuf-0.8

root@Server:~# python3

Python 3.6.9 (default, Oct 8 2020, 12:12:24)

[GCC 8.4.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import google.protobuf

>>>

环境搭建完成。

经验总结:可以尝试在原始系统Ubuntu14.04上执行6)以下的步奏,即在安装了python3的基础上执行上面卸载python2.7的命令(python2.7并未真实卸载掉,如下图1),然后卸载pip并清掉pip的文件;再参照(四)安装环境。

7)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值