5

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?

Shruf
  • 103
  • 2
  • 8
  • Probably, this could solve the issue: [What does “error: option --single-version-externally-managed not recognized” indicate?](http://stackoverflow.com/questions/14296531/what-does-error-option-single-version-externally-managed-not-recognized-ind) – awesoon Feb 03 '16 at 05:39
  • I used the --egg solution in that post and it worked, thanks. – Shruf Feb 03 '16 at 05:54

1 Answers1

5

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')
msp
  • 3,272
  • 7
  • 37
  • 49
Haroon Ahmed
  • 136
  • 4
  • 14