【问题标题】:How to python pip install for Python 2.7, having using Python 3.6 before on Windows如何为 Python 2.7 安装 python pip,之前在 Windows 上使用过 Python 3.6
【发布时间】:2018-03-19 16:59:30
【问题描述】:
  • 我想问一下,当我之前安装和使用 Python 3.6 时,如何将 pip install 用于 Python 2.7? (*我现在必须在 Windows 上使用 Python 版本)

    pip install ... 继续为 Python 3.6 安装

我需要使用以前的版本,在 Python 2.7 中重写代码。 (这是用于构建 Kivy 应用程序,虽然 Kivy 说它现在支持 Python 3 但它也说 * 警告。)为了做到这一点,我必须 @987654323 @ 必要模块:kivynumpy

希望对此提供反馈,谢谢。

【问题讨论】:

  • windows 还是 linux?只需从绝对路径运行pip。在 Windows 中,它位于 python install 的 scripts 子目录中
  • 指定python版本:pip2.7安装
  • 感谢@Jean-FrançoisFabre。 cdScripts 文件夹解决了这个问题。
  • @Jean-FrançoisFabre 抱歉,Linux 终端中的pip 怎么样?

标签: python python-2.7 python-3.x pip


【解决方案1】:

如果您确实安装了这 2 个版本,您的 PATH 中应该有一个 pip2pip2.x 可用

【讨论】:

  • 谢谢。我能够运行pip3,但不能运行pip2,也不能运行pip2.x。 **但现在将cd 更改为Scripts 文件夹即可解决问题。
猜你喜欢
  • 2011-10-19
  • 2017-05-10
  • 2017-09-04
  • 2018-08-06
  • 2017-11-21
  • 2019-06-13
  • 1970-01-01
  • 1970-01-01
  • 2013-12-25
相关资源
最近更新 更多