Pip 安装到较旧的 Python 版本
我正在尝试使用以下方法安装 mysql-python:
pip install mysql-python
尽管我的系统上已经安装了 Python 2.6,但下面正在安装该软件包。
/Library/Python/2.5/site-packages
我怎样才能让 pip 安装在:
/Library/Python/2.6/site-packages
我尝试使用:
pip install --install-option="--prefix=/Library/Python/2.6/site-packages/" mysql-python
但这不起作用,它输出:
Requirement already satisfied (use --upgrade to upgrade): mysql-python in
/Library/Python/2.5/site-packages
Cleaning up...
I am trying to install mysql-python using:
pip install mysql-python
the package is being installed below, although I already have Python 2.6 on the system.
/Library/Python/2.5/site-packages
How can I get pip to install in:
/Library/Python/2.6/site-packages
I tried using:
pip install --install-option="--prefix=/Library/Python/2.6/site-packages/" mysql-python
but that didn't work and it outputs:
Requirement already satisfied (use --upgrade to upgrade): mysql-python in
/Library/Python/2.5/site-packages
Cleaning up...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你应该有 pip-2.6。如果您没有 pip 版本 2.6:
您必须安装 Python 2.6 的 setuptools(例如:setuptools-0.6c11-py2.6.egg)。然后,您就有了 easy_install-2.6。你可以这样做:
最后,你拥有了 pip 2.6 版本。要安装 mysql-python :
You should have pip-2.6. If you don't have pip version 2.6 :
You have to install setuptools for Python 2.6 (example : setuptools-0.6c11-py2.6.egg). Then, you have easy_install-2.6. You can do :
Finally, you have pip version 2.6. To install mysql-python :