ImportError: No module named mysql.connector using Python2

前端 未结 12 2066
爱一瞬间的悲伤
爱一瞬间的悲伤 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:50

    This worked in ubuntu 16.04 for python 2.7:

    sudo pip install mysql-connector
    

提交回复
热议问题