python does not have a mysql library.Nector in Xubuntu

Asked

Viewed 80 times

-2

I tried several things to install this blessed library, my project is for next Tuesday(02/11/2002) and unfortunately I could not install in Xubuntu...

sudo pip3 mysql.connector

I need this library, otherwise my entire code crashes. Thank you, hugs.

  • Please put in your question the error that is being generated so we can help you.

1 answer

1


Barter,

I just did the installation smoothly on Linux, I think you got confused, see:

When importing this library into a python font, you do it this way:

import mysql.connector

But when doing the installation by Pip, this library has another name, it is mysql-Connector-python, try to install as follows:

pip3 install mysql-connector-python

Obs.: I didn’t have to use sudo


Reference: https://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python

  • Look, thank you very much saw? It worked!!!!!!!!!!!!!!!!!!! Vlw even :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.