python 3.5 – install oracle mysql driver on ubuntu [solved]

Installing this mysql driver is surprisingly quite a painful experience.

Steps

  1. Download package relevant for your distribution and python version from oracle website:
    https://dev.mysql.com/downloads/connector/python/
  2. Install downloaded package:
    sudo dpkg -i mysql-connector-python-py3

    _2.1.3-1ubuntu15.04_all.deb

  3. Go into python and run “import mysql”
  4. For all virtualenvs, simply symlink:
    ln -s /usr/lib/python3/dist-packages/mysql <path_to_virtual_env>/lib/pythonX.X/site-packages

It should be good by now.

Post a Comment

Your email is never published nor shared. You're allow to say what you want...