I'm on python 3.5.1 and I am having trouble installing mysql connector:
install --allow-external mysql-connector-python-rf mysql-connector-python-rf
is not working, neither is the normal pip command for mysql-connector-python-rf. I am getting the following message:
error: option --single-version-externally-managed not recognized
Any ideas?
Installation: To install Python-mysql-connector module, one must have Python and PIP, preinstalled on their system. To check if your system already contains Python, go through the following instructions: Open the Command line(search for cmd in the Run dialog( + R).
The easiest way to probably install and use MySQL in Python is to open up your command prompt. Once the command prompt is opened, then specify the full path to the Scripts folder of the Python package. Once you have this full path specified to the Scripts folder, then type in, pip install pymysql.
MySQL Connector/Python 8.0 is highly recommended for use with MySQL Server 8.0, 5.7, and 5.6.
There is no mysql-connector
for python 3.5.1
up till now, but you can use pymysql to connect mysql to python 3.5.1!
import pymysql
conn = pymysql.connect(host='localhost', port=port_no, user='db_user', passwd='password', db='db_name')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With