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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
W
WeLiveSecurity
C
Check Point Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
A
Arctic Wolf
NISL@THU
NISL@THU
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tenable Blog
G
GRAHAM CLULEY
O
OpenAI News
S
Schneier on Security
Google Online Security Blog
Google Online Security Blog
Vercel News
Vercel News
宝玉的分享
宝玉的分享
Attack and Defense Labs
Attack and Defense Labs
T
The Blog of Author Tim Ferriss
量子位
aimingoo的专栏
aimingoo的专栏
The Cloudflare Blog
P
Privacy & Cybersecurity Law Blog
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 热门话题
博客园_首页
F
Full Disclosure
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Docker
U
Unit 42
A
About on SuperTechFans
博客园 - 司徒正美
Hacker News - Newest:
Hacker News - Newest: "LLM"
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Scott Helme
Scott Helme
TaoSecurity Blog
TaoSecurity Blog

博客园 - cleardo

大模型的原理学习(二) 大模型的原理学习(一) 我的测试开发十年之路 命令行安装ipa包 ios设备管理 tomcat远程部署 移动线路的测试方案设计 iOS开发过程中的内存监控 iOS添加图片 iOS交叉编译 iOS日志获取 使用flask开发web应用 Ipa打包并安装到iphone 单元测试的痛点 Graphviz入门 Iphone常用工具 iOS越狱后必装软件 构建iOS交叉编译环境 pycurl库使用详解
Python隔离环境的搭建
cleardo · 2015-06-27 · via 博客园 - cleardo

在nodejs中,我们可以指定扩展安装的路径,那么在python中,我们是不是也可以这么做呢?

当然可以,我们只需要安装一个扩展virtualenv或者virtual wrapper就可以实现环境的隔离了

什么是virtualenvwrapper

Virtualenvwrapper是个virtualenv的包装而已,就是说,他是virtualenv的升级版    

Windows下有个virtualenvwrapper-win以用

指定安装虚拟环境的目录:

export WORKON_HOME=$HOME/.virtualenvs

mkvirtualenv 创建一个虚拟环境,并自动切换到这一环境中

workon 激活指定的虚拟环境

deactivate 解除虚拟环境

pip install -Ur requirements.txt 安装所有依赖的库