我知道这是一种简单的方法,但我既没有在这里也没有在谷歌。 所以我很好奇是否有一种方法可以使用pip安装多个包。 喜欢的东西:

pip install progra1 , progra2 ,progra3 ,progra4 . 

or:

pip install (command to read some txt containing the name of the modules) 

当前回答

你可以简单地把多个名字放在一起,用空格隔开

C:\Users\Dell>pip install markdown django-filter

#c:\Users\Dell is path in my pc this can be anything on yours

在我的设备上安装了markdown和django-filter。

其他回答

您可以安装一个称为需求文件的文本文件中列出的包。 例如,如果你有一个名为req.txt的文件,包含以下文本:

Django==1.4
South==0.7.3

然后在命令行发出:

pip install -r req.txt

PIP将安装文件中列出的特定版本的包。

pip install -r requirements.txt

在requirements.txt文件中,您将模块放在一个列表中,每行一个项目。

Django = 1.3.1 南> = 0.7 django-debug-toolbar

给出与安装单个模块时相同的命令,只是通过空格分隔的格式传递

你可以简单地把多个名字放在一起,用空格隔开

C:\Users\Dell>pip install markdown django-filter

#c:\Users\Dell is path in my pc this can be anything on yours

在我的设备上安装了markdown和django-filter。

作为对其他答案的补充,您可以使用——no-cache-dir选项禁用pip中的缓存。用pip install -r requirements.txt同时安装多个包时,我的虚拟机崩溃了。我解决的问题是:

pip install --no-cache-dir -r requirements.txt