问题
I'd like to use the mysql-connector
library for python 3. I could use pymysql
instead, but mysql-connector
already has a connection pool implementation, while pymysql
doesn't seem to have one. So this would be less code for me to write.
However, when I do
$ pip3 search mysql-connector
I find that these 3 libraries are available:
mysql-connector-repackaged - MySQL driver written in Python
mysql-connector-python-rf - MySQL driver written in Python
mysql-connector-python - MySQL driver written in Python
This is very confusing. Anybody knows which one I should use and why?
Thanks for your help.
回答1:
I was just asking myself similar question and I think I found the "fresh" answer. Here is info from two weeks ago: https://github.com/pypa/warehouse/issues/5537
It seems that currently a long-inactive person is owner of the mysql-connector name, hence MySQL developers release under name mysql-connector-python.
回答2:
The main differences between them are:
mysql-connector-repackaged: is old, do not use it
mysql-connector-python 2.0.4: is the original uploaded by MySQL. But it has the problem that does not works with Django >= 1.8. MySQL did not upload yet their stable version 2.1.3 to this repo.
mysql-connector-python-rf 2.1.3: is the solution to all your problems if you use Django >= 1.8
回答3:
If I were to base my assessment on the goodness of a package by how many people have downloaded it, I would suggest you choose mysql-connector-python-rf 2.1.3.
mysql-connector-repackaged 0.3.1 was uploaded in 2012 and had 406 downloads last month (https://pypi.python.org/pypi/mysql-connector-repackaged)
mysql-connector-python-rf 2.1.3 was uploaded in 2015 and had 1416 downloads in the last month (https://pypi.python.org/pypi/mysql-connector-python-rf)
mysql-connector-python 2.0.4 has only had 5 downloads in the past month, but that seems to be because it is the official one from http://dev.mysql.com/doc/connector-python/en/
mysql-connector-python-rf worked for me with pip whereas mysql-connector-python gave me issues.
来源:https://stackoverflow.com/questions/34168651/what-are-the-differences-between-mysql-connector-python-mysql-connector-python