Python
赵钱孙李葱
if(!编程){
喜欢
}
展开
-
windows下,vscode配合pyenv-win使用python虚拟环境
vscode安装python插件安装pyenv-win,推荐使用chocolatey安装pyenv安装需要的python版本,安装后需要pyenv rehash创建工程文件夹在文件夹中输入pyenv local 3.8.2 #版本根据自己需要的python版本替换pyenv -m venv .venv此时文件夹下生成.venv文件在vscode中点击左下角选择该python解释器即可...原创 2020-12-18 23:28:48 · 1606 阅读 · 1 评论 -
python 换国内源
1. 常用国内源阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(douban) http://pypi.douban.com/simple/清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/2. 临时换原创 2020-11-09 22:27:17 · 190 阅读 · 0 评论 -
Python爬取小说
import requestsimport reimport timefrom bs4 import BeautifulSoupdef get_html(url): # 获取网页 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KH...原创 2020-03-20 13:54:49 · 244 阅读 · 0 评论