与
ESC
输入关键词搜索文章

python提示ImportError: No module named mysql.connector

全文约 175 字预计阅读 1 分钟
今天在centos7下Python版本2.7.5执行脚本提示缺少mysql模块 很简单执行yum install mysql-connector-python安装下模块即可 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package mysql-connector-python.noarch 0:1.1.6-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================================== Package Arch Version Repository Size ==================================================================================================================== Installing: mysql-connector-python noarch 1.1.6-1.el7 epel 154 k Transaction Summary ==================================================================================================================== Install 1 Package Total download size: 154 k Installed size: 636 k Is this ok [y/d/N]: y Downloading packages: mysql-connector-python-1.1.6-1.el7.noarch.rpm | 154 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql-connector-python-1.1.6-1.el7.noarch 1/1 Verifying : mysql-connector-python-1.1.6-1.el7.noarch 1/1 Installed: mysql-connector-python.noarch 0:1.1.6-1.el7 Complete!
python提示ImportError: No module named mysql.connector
分享

发表评论

评论 0 条

暂无评论,来说点什么吧。