pip 批量导出包含环境中所有组件的requirements.txt文件

pip freeze > requirements.txt

pip 批量安装requirements.txt文件中包含的组件依赖

pip install -r requirements.txt

pip 导出的requirements.txt文件格式

absl-py==0.2.
astor==0.6.
bleach==1.5.
boto==2.48.
boto==31.7.
botocore==1.10.
bz2file==0.98
certifi==2018.4.
chardet==3.0.
cycler==0.10.
Cython==0.28.
docutils==0.14
fasttext==0.8.
future==0.16.
gast==0.2.
gensim==3.4.
grpcio==1.11.
h5py==2.7.
html5lib==0.9999999

conda 批量导出包含环境中所有组件的requirements.txt文件

conda list -e > requirements.txt

conda 批量安装requirements.txt文件中包含的组件依赖

conda install --yes --file requirements.txt    #这种执行方式,一遇到安装不上就整体停止不会继续下面的包安装
FOR /F "delims=~" %f in (requirements.txt) DO conda install --yes "%f" #这个执行能解决上面出现的不执行后续包的问题

conda 导出的requirements.txt文件格式

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
absl-py=0.7.1=pypi_0
astor=0.7.1=pypi_0
certifi=2018.8.24=py35_1
gast=0.2.2=pypi_0
grpcio=1.19.0=pypi_0
h5py=2.9.0=pypi_0
keras-applications=1.0.7=pypi_0
keras-preprocessing=1.0.9=pypi_0
markdown=3.1=pypi_0
mock=2.0.0=pypi_0
numpy=1.16.2=pypi_0
pbr=5.1.3=pypi_0
pip=19.0.3=pypi_0
protobuf=3.7.1=pypi_0
python=3.5.6=he025d50_0
setuptools=40.2.0=py35_0
six=1.12.0=pypi_0
tensorboard=1.13.1=pypi_0
tensorflow=1.13.1=pypi_0
tensorflow-estimator=1.13.0=pypi_0
termcolor=1.1.0=pypi_0
vc=14.1=h0510ff6_4
vs2015_runtime=14.15.26706=h3a45250_0
werkzeug=0.15.1=pypi_0
wheel=0.31.1=py35_0
wincertstore=0.2=py35hfebbdb8_0

pip / conda 导出和安装环境组件 requirements.txt的更多相关文章

  1. Python使用requirements.txt安装类库

    摘要:我们为何要应用requirements.txt呢? 首要应用目标: 任何 运用顺序 平常 须要设置装置 所需并 依附 一组类库去知足 事情请求 . 请求 文件 是 指定 战 一次性 装置 包 的 ...

  2. python requirements.txt的创建及使用

    要求文件(requirements.txt)是安装包的依赖项及版本的记录文件. pip: 创建 (venv) $ pip freeze >requirements.txt 使用 (venv) $ ...

  3. requirements.txt的创建及使用

    python的包管理 pip方式: 创建 (venv) $ pip freeze >requirements.txt 执行 (venv) $ pip install -r requirement ...

  4. python requirements.txt批量下载安装离线

    有些情况下我们需要下载N个第三方包,或者下载的包依赖其它包,一个个下载非常浪费时间.这时我们可以通过如下两种方式的命令批量下载. 方式1 pip download -d /tmp/packagesdi ...

  5. pip freeze > requirements.txt` 命令输出文件中出现文件路径而非版本号

    pip freeze > requirements.txt 命令输出文件中出现文件路径而非版本号 解决办法: pip list --format=freeze > requirements ...

  6. python包管理(distutils、easy_install、pip、setup.py/requirements.txt、wheel)

    distutils.distutils2 distutils是 python 标准库的一部分,2000年发布.使用它能够进行 python 模块的 安装 和 发布. distutils2 被设计为 d ...

  7. conda环境py36 requirements.txt

    生成: conda list -e > requirements.txt 使用: conda install --yes --file requirements.txt # This file ...

  8. Python项目搬迁,快捷导出环境依赖包到requirements.txt

    项目搬迁的时候,需要把当前的环境依赖包导出,然后到部署项目的服务器上安装依赖. 我们可以通过下面的命令执行,把依赖包导出到requirements.txt文件里. 生成requirements.txt ...

  9. 【转】项目搬迁,快捷导出环境依赖包到requirements.txt

    项目搬迁的时候,需要把当前的环境依赖包导出,然后到部署项目的服务器上安装依赖. 我们可以通过下面的命令执行,把依赖包导出到requirements.txt文件里. 生成requirements.txt ...

随机推荐

  1. Python学习-类

    类是对象的模板或蓝图,类是对象的抽象化,对象是类的实例化 在python中,一个对象的特征也称为属性(attribute),它所具有的的行为也称为方法(method) 对象 = 属性(特征)+方法(行 ...

  2. Python: 为对象动态添加函数,且函数定义来自一个str

    转自:http://blog.sina.com.cn/s/blog_55a11f330100ab1x.html 在Python中,通常情况下,你只能为对象添加一个已经写好的方法 需求:传入一个str类 ...

  3. BZOJ4145 [AMPPZ2014]The Prices

    题意 你要购买m种物品各一件,一共有n家商店,你到第i家商店的路费为d[i],在第i家商店购买第j种物品的费用为c[i][j],求最小总费用. \(n \leq 100,m \leq 16\) 分析 ...

  4. 笔记:使用 stylus stylus-loader

    笔记:使用 stylus stylus-loader 安装 stylus Stylus-loader cnpm i stylus stylus-loader --save 配置 webpack.con ...

  5. (四)、Fiddler打断点

    一.打断点是Fiddler一个比较好用的功能,它可以做一些手工操作很难做的事情. 那为什么要打断点? 看下图,Fiddler打开后,Client(客户端)发送的请求会先经过Fiddler,然后Fidd ...

  6. Eclipse 创建类时添加继承

    eclipse 中类的继承创建有两种方式: 1.手动敲代码通过 extends 关键字来继承 public class A extends B { } 2.在创建类的时候就选择好继承关系 点击 Fin ...

  7. 1、spark集群搭建

    前提:已经搭建完全分布式的Hadoop集群,请参看http://www.cnblogs.com/netbloomy/p/6660131.html 1.Scala2.12.1环境搭建 1).下载scal ...

  8. HTML第一讲

    HTML标记区分 HTML即超文本标记语言(HtyperText Markup Language),其作用就是将编辑的内容在屏幕上显示.文件的后缀为.HTML. 在HTML中成对出现的叫做双标记(譬如 ...

  9. Unit02: 参数值注入 、 基于注解的组件扫描

    Unit02: 参数值注入 . 基于注解的组件扫描 (4)IOC (Inversion Of Controll 控制反转) 什么是IOC? 对象之间的依赖关系由容器来建立. 什么是DI? (Depen ...

  10. OPCClient和OPCServer在Windows上运行方式的恩怨

    http://www.diangon.com/wenku/PLC/201504/00021970.html 近段时间,遇到不少人都被OPCClient与OPCServer之间的通讯搞得头大,通过几次远 ...