部署一个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)
本文来自博客园,作者:꧁执笔小白꧂,转载请注明原文链接:https://www.cnblogs.com/qq2806933146xiaobai/p/14378424.html
分类:
其他开发语言-Python
, 其他开发语言-Android
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?