importing mysql connector for python in visual studio code

huangapple go评论51阅读模式
英文:

importing mysql connector for python in visual studio code

问题

I want to import mysql connector for python in visual studio code but it is giving error like this:

ModuleNotFoundError: No module named 'mysql.connector'

what should I do??

I am trying to get the python connectivity for that, I want to know the answer to this question.

英文:

I want to import mysql connector for python in visual studio code but it is giving error like this :

ModuleNotFoundError: No module named 'mysql.connnector'

what should I do??

I am tring to getting the python connnectivity for that ,I want know answer of this quetion .

答案1

得分: 0

你首先需要通过PIP安装它。

pip install mysql-connector-python

然后,你可以在你的代码中使用它。

from mysql.connector

在这里查找更多信息:

https://pypi.org/project/mysql-connector-python/

https://dev.mysql.com/doc/connector-python/en/connector-python-introduction.html

英文:

You have to install it first through PIP.

pip install mysql-connector-python

Then you can use this in your code

from mysql.connector

Find more here:

https://pypi.org/project/mysql-connector-python/

https://dev.mysql.com/doc/connector-python/en/connector-python-introduction.html

huangapple
  • 本文由 发表于 2023年2月23日 21:58:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/75545794.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定