当前位置:网站首页>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 virtualenv2. 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 pathname3. Activate the environment
Under linux
$ source ./bin/activateUnder windows
.\Scripts\activate.bat4. 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 ~/.bashrc2. Create a virtual environment
# under macOS/Linuxmkvirtualenv --python=python3.6 venv# under Windowsmkvirtualenv --python=python3 venv3. Activate the virtual environment
workon #List the virtual environment listworkon [venv] #Switch environment4. Exit the environment
deactivate5. Delete the environment
rmvirtualenv venv边栏推荐
猜你喜欢

今年的很美味

小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要

入门数据库Days4

小程序中的多表联合查询

2022 edition of MySQL tutorial, top collection good, take your time

SOM网络2: 代码的实现

2022 版 MySQL 巅峰教程,收藏好,慢慢看

Mini Program Graduation Works WeChat Food Recipe Mini Program Graduation Design Finished Product (8) Graduation Design Thesis Template

The must-have "fishing artifact" for programmers is here!

不卷了!入职字节跳动一周就果断跑了。
随机推荐
[深入研究4G/5G/6G专题-48]: 5G Link Adaption链路自适应-4-下行链路自适应DLLA-PDCCH信道
【SeaTunnel】从一个数据集成组件演化成企业级的服务
企业公众号文章写作方向:如何写出读者认可的优质内容
dvwa 通关记录1 - 暴力破解 Brute Force
今日睡眠质量记录74分
高等代数_证明_矩阵的行列式为特征值之积, 矩阵的迹为特征值之和
复现gallerycms字符长度限制短域名绕过
Wechat Gymnasium Reservation Mini Program Graduation Design Finished Work Mini Program Graduation Design Finished Product (2) Mini Program Function
力扣第 304 场周赛复盘
今年的很美味
SAP Spartacus NgExpressEngineDecorator 的工作原理
将vim与系统剪贴板的交互使用
[Mobile Web] Mobile terminal adaptation
(Translation) How the contrasting color of the button guides the user's actions
牛客多校4 A.Task Computing 思维
工程建筑行业数据中台指标分析
求解多元多次方程解的个数
线上故障排查方案
xss相关知识点以及从 XSS Payload 学习浏览器解码
No more rolls!After joining ByteDance for a week, he ran decisively.