通过requirements.txt文件创建虚拟环境副本
2017-01-30 19:11
417 查看
1、首先在原来的环境中生成一个需求文件requirements.txt,用于记录所有依赖包及其精确的版本号。
(venv) $ pip freeze >requirements.txt
2、创建副本时先创建一个新的虚拟环境
$ virtualenv venv
3、激活虚拟环境
$ venv\Scripts\activate
4、创建副本
(venv) $ pip install -r /../requirement.txt
命令pip install 的参数 -r 的说明:
-r, --requirement <file> Install from the given requirements file. This
option can be used multiple times.
即pip install -r 命令会一次性安装requirements.txt文件里面列出需要安装的库
(venv) $ pip freeze >requirements.txt
2、创建副本时先创建一个新的虚拟环境
$ virtualenv venv
3、激活虚拟环境
$ venv\Scripts\activate
4、创建副本
(venv) $ pip install -r /../requirement.txt
命令pip install 的参数 -r 的说明:
-r, --requirement <file> Install from the given requirements file. This
option can be used multiple times.
即pip install -r 命令会一次性安装requirements.txt文件里面列出需要安装的库
相关文章推荐
- w3cschool juery代码摘记
- IOS UItableview UIcollectionview cell高度自适应
- AFNetworking源码 - Multipart协议,AFURLRequestSerialization和AFURLResponseSerialization
- iOS超全开源框架、项目和学习资料汇总:UI篇
- L293D电机驱动版在Arduino上使用笔记
- 数据库异常整理:org.hibernate.QueryException: could not resolve property: “xxx”
- java web实现easyui树(第一版本)
- (七)charper4-Building a Social Website之djangoByExample阅读笔记
- LinkedHashMap<String, Bitmap>(0, 0.75f, true) LinkedHashMap的加载因子和初始容量分配
- poj入门水题--动态规划(DP)2533 Longest Ordered Subsequence 1088滑雪
- HDU 1711 Number Sequence(KMP模板)
- 2 - 6 - Gradient Descent Intuition (12 min)
- Leetcode 63. Unique Paths II
- 491. Increasing Subsequences
- Quine----输出本身的程序
- Leetcode 62. Unique Paths
- django admin后台插件:django-suit入门
- 不跟随手指的小球--OnGestureListener和SCROLLER的使用
- 【PAT】1101. Quick Sort
- BurpSuite系列(十)----Extender模块(扩展器)