简体   繁体   English

我应该为MySQL使用什么python 3库?

[英]What python 3 library should I use for MySQL?

As far as I know MySQLdb still isn't ported to Python 3. 据我所知MySQLdb仍然没有移植到Python 3。

There seems to be another library called PyMySQL on pypy but the installation for python 3 looks strange (run a .sh script?). 在pypy上似乎有另一个名为PyMySQL的库但是python 3的安装看起来很奇怪(运行.sh脚本?)。 Also there is a library called PyMySQL3 but I can't find info about what it's about. 还有一个名为PyMySQL3的库,但我无法找到有关它的信息。

What's the preferred way to use MySQL with Python 3 these days? 如今,在Python 3中使用MySQL的首选方法是什么?

Is there an elegant solution that could be installed with pip or with a python setup.py install command? 是否有一个优雅的解决方案可以使用pip或python setup.py install命令python setup.py install

I've used the basic mysql-connector from MySQL for a few Python 3 projects, along with SQLAlchemy. 我已经使用MySQL的基本mysql-connector和一些Python 3项目以及SQLAlchemy。

I also tried PyMySQL , but if I remember correctly I had a more difficult time configuring it. 我也试过PyMySQL ,但是如果我没记错的话,我在配置它时遇到了更多困难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM