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

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

1)查看当前版本:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty

2)执行更新:

sudo apt-get update
sudo apt-get upgrade
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.2
root@Server:~# python3 --version
Python 3.6.9

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

  部署一个Python爬虫环境(四)-ubuntu版_Server系统过渡篇

补充: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
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

  Mitmproxy安装完成:  

root@XiakeAndroidServer:~# mitmproxy --version
Mitmproxy: 5.3.0
Python:    3.6.9
OpenSSL:   OpenSSL 1.1.1h  22 Sep 2020
Platform:  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并未真实卸载掉),然后卸载pip并清掉pip的文件;再参照(四)安装环境。

7)

 

posted @ 2021-02-05 16:23  ꧁执笔小白꧂  阅读(153)  评论(0编辑  收藏  举报