我正在尝试安装 MySQL_python 的 1.2.2 版,使用使用 --no-site-packages 选项创建的全新 virtualenv.PyPi 中显示的当前版本是 1.2.3.有没有办法安装旧版本?我试过了:
I am trying to install version 1.2.2 of MySQL_python, using a fresh virtualenv created with the --no-site-packages option. The current version shown in PyPi is 1.2.3. Is there a way to install the older version? I have tried:
pip install MySQL_python==1.2.2
然而,安装后,它仍然在站点包中显示MySQL_python-1.2.3-py2.6.egg-info.这是这个包特有的问题,还是我做错了什么?
However, when installed, it still shows MySQL_python-1.2.3-py2.6.egg-info in the site packages. Is this a problem specific to this package, or am I doing something wrong?
TL;DR:
pip install -Iv(即pip install -Iv MySQL_python==1.2.2)首先,我发现您尝试执行的操作存在两个问题.由于您已经安装了版本,您应该卸载当前现有的驱动程序或使用 pip install -I MySQL_python==1.2.2
First, I see two issues with what you're trying to do. Since you already have an installed version, you should either uninstall the current existing driver or use pip install -I MySQL_python==1.2.2
但是,您很快就会发现这行不通.如果您查看 pip 的安装日志,或者执行 pip install -Iv MySQL_python==1.2.2,您会发现 PyPI URL 链接不适用于 MySQL_python v1.2.2.你可以在这里验证:http://pypi.python.org/pypi/MySQL-python/1.2.2
However, you'll soon find out that this doesn't work. If you look at pip's installation log, or if you do a pip install -Iv MySQL_python==1.2.2 you'll find that the PyPI URL link does not work for MySQL_python v1.2.2. You can verify this here: http://pypi.python.org/pypi/MySQL-python/1.2.2
由于 sourceforge.net 最近的升级和 PyPI 的陈旧 URL,下载链接 404 和回退 URL 链接无限重定向.
The download link 404s and the fallback URL links are re-directing infinitely due to sourceforge.net's recent upgrade and PyPI's stale URL.
因此要正确安装驱动程序,您可以按照以下步骤操作:
So to properly install the driver, you can follow these steps:
pip uninstall MySQL_python
pip install -Iv http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz/download
这篇关于使用 pip 安装特定的软件包版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为