I used the PyMySQL3 driver from python to access the utf8mb4 pre-configured database. Then, KeyError: 45 error occurred, so instead, [mysql-connector-python-rf](https://pypi.python.org/pypi/mysql-connector-python-rf] provided by the MySQL official ) I used the driver, but there was a minor problem at that time, so I will record it as a reminder.
Version |
---|
OS |
python |
pip |
mysql-connector-python-rf |
PyMySQL3 (reference) |
First, I ran the following command to install the driver.
pip install mysql-connector-python-rf
However,
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/j2/8h3wfb391t1_58crtwyc1xx00000gp/T/pip-build-6oqq9ezx/mysql-connector-python-rf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/j2/8h3wfb391t1_58crtwyc1xx00000gp/T/pip-hwj0p9pe-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/j2/8h3wfb391t1_58crtwyc1xx00000gp/T/pip-build-6oqq9ezx/mysql-connector-python-rf/
Error occurred and the installation could not be performed. As a result of various investigations
pip install --egg mysql-connector-python-rf
The installation was successful by adding the --egg option. With this driver, you can operate the utf8mb4 database without any problems.
During the installation, the warning DEPRECATION: --egg has been deprecated and will be removed in the future . was displayed, so it may not be usable anytime soon.
Recommended Posts