Apr-21-2018, 05:41 PM
There no need to use package from distro,use as recommend PyMySQL(Pure Python MySQL Driver).
I use pyenv,so my python and pip is set to 3.6
Normal for Python 3 without pyenv is to use pip3
I use pyenv,so my python and pip is set to 3.6
Normal for Python 3 without pyenv is to use pip3
pip3 install PyMySQL
.# Test python and pip mint@mint ~/mp3_env $ pip -V pip 9.0.1 from /home/mint/.pyenv/versions/3.6.4/lib/python3.6/site-packages (python 3.6) mint@mint ~/mp3_env $ python -V Python 3.6.4 # Install mint@mint ~/mp3_env $ pip install PyMySQL Collecting PyMySQL Using cached https://files.pythonhosted.org/packages/e5/07/c0f249aa0b7b0517b5843eeab689b9ccc6a6bb0536fc9d95e65901e6f2ac/PyMySQL-0.8.0-py2.py3-none-any.whl Installing collected packages: PyMySQL Successfully installed PyMySQL-0.8.0Test that it work.
Python 3.6.4 (default, Mar 15 2018, 15:35:10) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pymysql.cursors >>> # no errorThen is just to follow Example.