惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy International News Feed
F
Full Disclosure
P
Proofpoint News Feed
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Blog of Author Tim Ferriss
T
Threatpost
L
Lohrmann on Cybersecurity
I
Intezer
S
SegmentFault 最新的问题
小众软件
小众软件
T
Threat Research - Cisco Blogs
MongoDB | Blog
MongoDB | Blog
美团技术团队
NISL@THU
NISL@THU
罗磊的独立博客
N
News | PayPal Newsroom
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 聂微东
W
WeLiveSecurity
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
D
Darknet – Hacking Tools, Hacker News & Cyber Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Schneier on Security
Schneier on Security
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
U
Unit 42
The Cloudflare Blog
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Recent Announcements
Recent Announcements
D
DataBreaches.Net
量子位

博客园 - whitesky-root

git clone加速 Ubuntu 22.04 x86_64 cron不执行原因 k8s之认证文件失效,导致kubelet无法正常启动 supervisor 配置 安装 oop坑 jenkins打包报错: django jsonfield字段更新的坑 golang 效率工具库 gcc免编译安装配置 运维 chroot mysql lost connection to mysql server during query jdk镜像制作 curl 测试websocket请求 kubeadm reset 重置 VMware虚拟机无法联网 python 数据库连接池 Git找回add 后,未commit的文件(使用reset -hard 命令导致文件清除) set -e -x k8s pod重启 deployment重启
windows python虚拟环境配置
whitesky-root · 2026-03-31 · via 博客园 - whitesky-root

https://www.runoob.com/python3/python-venv.html

创建虚拟环境:

python3 -m venv 环境名称
-m venv:使用 venv 模块
.venv:虚拟环境的名称(可以自定义)


创建后的目录结构
.venv/
├── bin/ # 在 Unix/Linux 系统上
│ ├── activate # 激活脚本
│ ├── python # 环境 Python 解释器
│ └── pip # 环境的 pip
├── Scripts/ # 在 Windows 系统上
│ ├── activate # 激活脚本
│ ├── python.exe # 环境 Python 解释器
│ └── pip.exe # 环境的 pip
└── Lib/ # 安装的第三方库


激活虚拟环境
.venv\Scripts\activate
激活成功后,命令行提示符通常会显示环境名称:(.venv) $

查看已安装的包
(.venv) pip list

退出虚拟环境
当完成工作后,可以退出虚拟环境:deactivate


删除虚拟环境
要删除虚拟环境,只需删除对应的目录即可:
# 确保已退出环境
deactivate
# 删除目录
rm -rf .venv # Linux/macOS
del /s /q .venv # Windows (命令提示符)


安装包速度慢
使用国内镜像源:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package_name