社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

在命令“pip install-r requirements.txt”中,'-r'是什么意思?与“python3-m pip install something”中的相同,-m'是什么意思?

prasanth • 4 年前 • 2128 次点击  

在问这个问题之前我搜索了一下,但我确实得到了确切的答案。有人能告诉我在哪里读到这些操作员和其他类似的操作人员吗?提前谢谢。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/131007
文章 [ 4 ]  |  最新文章 4 年前
MojixCoder
Reply   •   1 楼
MojixCoder    4 年前

这意味着 从给定的需求文件安装软件包 :

pip install -r <file>
or 
pip install --requirement <file>
Ani
Reply   •   2 楼
Ani    4 年前

-r 用于告诉pip从需求文件安装软件包(用法: pip3 install -r <file> . -r 也可以写成 --requirement

你可以用 pip install --help 要了解更多可用于pip安装的参数

Syed Muhammad Dawoud Sheraz
Reply   •   3 楼
Syed Muhammad Dawoud Sheraz    4 年前

你可以用 --help 打印出命令可以接受的可能参数集。如果你使用 pip install --help ,它将显示论点及其意义。有关-r标志的含义,请参见下文:

-r, --requirement <file> Install from the given requirements file. This option can be used multiple times.

Chrispresso
Reply   •   4 楼
Chrispresso    4 年前

跑 python -h 获取参数及其函数的列表。

-m 用于作为脚本运行库模块。在这种情况下,你正在跑步 pip 作为剧本。

-r 来自 皮普 所以你可以 pip -h 更多细节。 pip install 也有选择,所以你可以 pip install -h 了解更多细节(你可以看到这是怎么回事)。总的想法是 -r 旨在从需求文件安装,并被视为某种依赖项。