Python Mysqldb "error: Microsoft Visual C++ 14.0 Is Required" Even Though It Has Been Installed
I'm attempting to connect to a MySql database and use its data for some code, though when I'm using pip install mysqlclient it gives me an error stating: 'error: Microsoft Visual
Solution 1:
It's a complicated environment.
I suggest to use pyodbc to connect to your database ( it isn't required by c++ compiler installation)
Try to convert the below code in your program
importpyodbcconn= pyodbc.connect('DRIVER={MySQL};SOCKET=/var/lib/mysql/mysql.sock;UID=rooter;PWD=sshh')
Solution 2:
Try this:
1- Download mysqlclient wheel on Unoffical Windows Binaries for Python Extension Packages. (search for mysqlclient-1.3.13-cp37-cp37m-win32)
2- Install manually pip install mysqlclient-1.3.13-cp37-cp37m-win32.whl
Solution 3:
I believe if you need MySQL database, this is installed by other means i.e. see Microsoft webpage for details (https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html).
If you just want to connect to MySQL database from Python, try installing mysql-connector instead.
pip install mysql-connector
Post a Comment for "Python Mysqldb "error: Microsoft Visual C++ 14.0 Is Required" Even Though It Has Been Installed"