【发布时间】:2014-09-05 16:31:15
【问题描述】:
我安装了多个版本的 Python (2.5,2.7)。我正在使用 Ubuntu。 Python2.7 是我默认的 Python 解释器。所以所有像PIL这样的包都安装在python2.7中。现在我想在 Python 2.5 版本中安装一些包。 我需要安装 Pip 以便我可以安装软件包。现在我明白有些人会给出 virtualenv 的建议。我也试过了。 但是通过它安装 Pil 也不会显示 python2.5 版本中的包。它安装在python2.7版本中。所以我需要做一些事情,以便当 pip 安装包时,它会在 Python2.5 版本中安装它。有什么建议吗?
我也试过这个:
python2 -m pip install SomePackage # default Python 2
python2.5 -m pip install SomePackage # specifically Python 2.5
但它说没有名为 pip 的模块
【问题讨论】:
标签: python-2.7 pip virtualenv python-2.5