当前位置:网站首页>Create virtual environments with virtualenv and Virtualenvwrapper virtual environment management tools
Create virtual environments with virtualenv and Virtualenvwrapper virtual environment management tools
2022-08-01 22:37:00 【Weft Collar Network】
First, use virtualenv
1. Install virtualenv
pip install -i https://pypi.douban.com/simple/ --trusted-host pypi.douban.com virtualenv
2. Create a running environment
virtualenv [virtual environment name]virtualenv venv#If you don't want to use the system package, add the --no-site-packages parametervirtualenv --no-site-packages create pathname
3. Activate the environment
Under linux
$ source ./bin/activate
Under windows
.\Scripts\activate.bat
4. Exit the environment
deactivate
5. Delete the environment
You can delete the venv folder directly to delete the environment
Second, use Virtualenvwrapper
Virtaulenvwrapper is an extension of virtualenv for easier managementVirtual Environment, it can do: - Integrate all virtual environments in one directory - Manage (add, delete, copy) virtual environment - quickly switch virtual environment
1. Installation
# under Windowspip install virtualenvwrapper-win# Under macOS / Linuxpip install --user virtualenvwrapper# load environment variablesecho "source virtualenvwrapper.sh" >> ~/.bashrcsource ~/.bashrc
2. Create a virtual environment
# under macOS/Linuxmkvirtualenv --python=python3.6 venv# under Windowsmkvirtualenv --python=python3 venv
3. Activate the virtual environment
workon #List the virtual environment listworkon [venv] #Switch environment
4. Exit the environment
deactivate
5. Delete the environment
rmvirtualenv venv
边栏推荐
- excel cell contian two words, seperated by a slash
- 复现gallerycms字符长度限制短域名绕过
- 解决 win10 下 ISE14.7的 iMPACT 崩溃问题 - FPGA 笔记
- 1391D. 505 状压dp
- 毕业十年,财富自由:那些比拼命努力更重要的事,从来没人会教你
- more grown, more lonely
- 选择合适的 DevOps 工具,从理解 DevOps 开始
- 得物客服热线的演进之路
- Small application project works WeChat stadium booking applet graduation design of the finished product (1) the development profile
- 越长大越孤单
猜你喜欢
03. GO language variable definition, function
小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要
How to prevent governance attacks in DAOs?
使用分类权重解决数据不平衡的问题
关于ETL的两种架构(ETL架构和ELT架构)
华为无线设备配置双链路冷备份(AP指定配置方式)
feel so stupid
JS prototype hasOwnProperty in Add method Prototype end point Inherit Override parent class method
移动端人脸风格化技术的应用
No more rolls!After joining ByteDance for a week, he ran decisively.
随机推荐
Flutter基础学习(一)Dart语言入门
如何防范 DAO 中的治理攻击?
如何给 UE4 场景添加游戏角色
APP special test: traffic test
别看了,这就是你的题呀
1391D. 505 状压dp
seaborn笔记:可视化统计关系(散点图、折线图)
blender3.2.1 unit setting
【开源】Sentinel高性能高可用集群限流解决方案
易周金融分析 | 银行ATM机智能化改造提速;互联网贷款新规带来挑战
Recycling rental system 100% open source without encryption Mall + recycling + rental
Delicious this year
No more rolls!After joining ByteDance for a week, he ran decisively.
Getting Started Database Days4
1. @Component注解的原理剖析
The must-have "fishing artifact" for programmers is here!
img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
线上故障排查方案
leetcode 204. Count Primes 计数质数 (Easy)
[Mobile Web] Mobile terminal adaptation