擅长:python、mysql、java
<p>即使显式地声明了嵌入的<a href="https://docs.python.org/3.6/using/windows.html#embedded-distribution" rel="noreferrer">version of python do not supports pip</a>,他们也说小心是可能的。在python的嵌入版本中使用pip有一个简单的解决方法。</p>
<p>PIP可以安装在嵌入式python中。你需要:</p>
<ul>
<li><p>下载并解压缩python“…可嵌入的zip文件”。(来源:<a href="https://www.python.org/downloads/" rel="noreferrer">https://www.python.org/downloads/</a>)</p></li>
<li><p>编辑文件'[python folder]\python36.\u pth'。取消对上面注释中建议的<code>import site</code>语句的注释。</p>
<pre><code>python36.zip
.
# Uncomment to run site.main() automatically
import site
</code></pre></li>
<li><p>将get-pip.py下载到python安装文件夹(源代码:<a href="https://pip.pypa.io/en/stable/installing/" rel="noreferrer">https://pip.pypa.io/en/stable/installing/</a>)</p></li>
<li><p>运行get pip脚本命令。这会将pip安装到[python]\Scripts目录中</p>
<pre><code>python get-pip.py
</code></pre></li>
<li><p>从命令行直接运行pip,因为pip是一个可执行程序(本例是安装pandas)</p>
<pre><code>.\Scripts\pip --install --user pandas
</code></pre></li>
</ul>
<p>您可以在<a href="https://github.com/pypa/pip/issues/4207" rel="noreferrer">pip issue 4207</a>中找到有关此的更多信息</p>