I'm attempting to do the mysql tutorial for the python connector.
Using Xubuntu 14.04, python3, mysql 5.5.35, eclipse Luna and pydev 3.6.0. I installed the python.connector via instructions on the mysql website.
When I use python 3 from the command line into the interactive shell, I can do
import mysql.connector
just fine. I can then proceed to do things with that import, for example all the following code runs fine:
>>> import mysql.connector
>>> cnx = mysql.connector.connect(user='root', password='root', host='127.0.0.1',database='testdb')
>>> cnx.close()
In eclipse, I am unable to import it properly, but I still have a red 'squiggly' with unresolved import
errors. As such I'm unable to use autocomplete for any of my script. . I've set up my interpreter to use python3 (as well as the python 3.4 option, tried separately).
On the left, I can see mysql under python > System Libs > python3/dist-packages > mysql
as part of my project
My interpreter is set up as such:
Regardless of what I do, I am unable to get it to import in eclipse. I've tried the answers here to no avail:
https://stackoverflow.com/a/3864323/3665278