<p>据我所知,皮普似乎没有这种能力,但我可能错了。</p>
<p>要在python中进行多处理,您可以使用多处理包,[这里是我找到的指南](<a href="http://pymotw.com/2/multiprocessing/basics.html" rel="nofollow noreferrer">http://pymotw.com/2/multiprocessing/basics.html</a>),如果您感兴趣,可以使用它,这是讨论它的python文档的<a href="https://docs.python.org/2/library/multiprocessing.html" rel="nofollow noreferrer">link</a>。我还发现这个问题<a href="https://stackoverflow.com/questions/3044580/multiprocessing-vs-threading-python">Multiprocessing vs Threading Python</a>很有用,它可以确保多处理可以像我认为的那样,利用多个cpu。</p>
<p>我已经浏览了pip源代码(可用的<a href="https://github.com/pypa/pip" rel="nofollow noreferrer">here</a>),寻找对多处理包的引用,但没有找到对该包的任何使用。这意味着pip不使用/支持多处理。据我所知,这个<code>/pip/commands/install.py</code>文件是您在运行<code>pip install <package></code>时调用的问题的兴趣所在。对于这个文件,特别是</p>
<pre><code>from __future__ import absolute_import
import logging
import os
import tempfile
import shutil
import warnings
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.locations import virtualenv_no_global, distutils_scheme
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exceptions import (
InstallationError, CommandError, PreviousBuildDirError,
)
from pip import cmdoptions
from pip.utils.deprecation import RemovedInPip7Warning, RemovedInPip8Warning
</code></pre>
<p>您可以看到它没有任何对多处理包的引用,但我确实检查了所有其他文件以确定。</p>
<p>此外,我检查了<a href="https://pip.pypa.io/en/latest/reference/pip_install.html#usage" rel="nofollow noreferrer">pip install documentation</a>,没有找到使用多个内核安装的引用。</p>
<p>医生:皮普没有按你的要求做。我可能是错的,因为我没有看那么长的来源,但我很确定它只是不支持它。</p>