ImportError: No module named mysql.connector using Python2

前端 未结 12 2082
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 06:26

I have two files. The first one has the connection and the getting of data. I import mysql.connector. This file is called tasksSql.py

def get_users():
    im         


        
12条回答
  •  感动是毒
    2020-12-13 06:54

    Depending on your python version and how you installed it, it is possible that mysql connector isn't installed, you can install it with pip

    To install mysql connector:

    pip install mysql-connector-python
    

提交回复
热议问题