python3 环境安装设置

python3 虚拟环境

// 设置虚拟环境
virtualenv .venv

// 启用虚拟环境, 所有安装的package会在虚拟环境下
source .venv/bin/active

// 取消设置虚拟环境
(venv)/$deactive

python 安装包

website: https://beautiful-soup-4.readthedocs.io/en/latest/

安装 beautifulSoup
$ apt-get install python-bs4 (for Python 2)

$ apt-get install python3-bs4 (for Python 3)

$ pip install beautifulsoup4
安装 parser
apt-get install python-lxml
website HTTP 错误

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412

posted @ 2024-02-19 10:13  ryankang  阅读(12)  评论(0)    收藏  举报