Bug #101128 Fails to install Connector/Python if python3.9 is installed
Submitted: 12 Oct 2020 10:04 Modified: 17 Mar 20:53
Reporter: Dimitar Nikov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S2 (Serious)
Version:8.0.21 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[12 Oct 2020 10:04] Dimitar Nikov
Description:
MySQL Connector/Python could not be installed via MySQL Installer and.or standalone installer MSI package if you have too recent version of Python installed, e.g. 3.9.0.

How to repeat:
1. Install python 3.9.0 or newer
2. Try to install Connector/Python via MySQL Installer (offline) or standalone installer MSI package - either 32-bit or 64-bit

Suggested fix:
Please make installer to support newer versions of Python.
[12 Oct 2020 10:39] MySQL Verification Team
Thank you for the bug report.
[14 Nov 2020 14:34] Hamid Heyhat
This is a long going bug for the windows user and whole people who develop for Python and Django, Its always the same which pushing us to drop the MySQL once and for all.
Bug reported at October 12 yet not a single update.
[20 Nov 2020 8:21] Rafal Somla
Unfortunately, the con/python code as it is written now will not work with
python 3.9. This is why installer refused to install the connector. The
earliest version where we can fix it is 8.0.24 and we are working on it!
[20 Nov 2020 10:54] Dimitar Nikov
Hi Rafal,
unfortunately Python team will continue to release new versions of Python on regular basis I am afraid.

More resilient solution is needed in order to prevent such bug reports for each and every new version of Python.
Thank you.
[23 Nov 2020 8:05] Rafal Somla
I hope this situation is exceptional because pyhton 3.9 has broken backward compatibility by removing one of the modules we use. Such things should not happen too often. We should also do a better job at tracking components that are obsoleted and thus can be removed at certain point. As soon as we fix this, we should remove python version constraints from our packages and then hopefully things will work smooth with any further python 3.x updates.
[24 Nov 2020 11:28] Rafal Somla
Sorry for introducing some confusion here as I was a bit confused myself. Actually the `imp` module that our code uses is deprecated but not removed in python 3.9 (and thus python 3.9 did not break backward compatibility as I originally thought). So our current code base should work with python 3.9 and there is no issue on that front (*). We still have issue with our MSI packages not recognizing python 3.9 and this we can fix only in 8.0.24. I agree we need some more resilient solution to avoid this situation in the future.

Note (*): As long as we talk about pure python connector only. The C extension will not work with python 3.9 without re-compilation.
[24 Nov 2020 11:45] Nuno Mariz
Like Rafal said, your code should work with Python 3.9.
You can install Connector/Python from source or via pip. A pure Python version will be installed, so no C extension will be available though.

The easiest way is using pip:
    pip install mysql-connector-python
or
    python -m pip install mysql-connector-python

If you want to install from source, you can follow the instructions from here https://dev.mysql.com/doc/connector-python/en/connector-python-installation-source.html
[7 Dec 2020 13:51] Hamid Heyhat
The solution provided here is not working for Django development, and referring to such a major bug to the next version is really irresponsible.
It should be fixed 10 times by now not to refer this to the next major update.
You expect us as a developer to sit here and wait weeks if not months until you release a fix that probably gonna work for two weeks if there is no new Python version!  or you think everyone is in love with Linux!
[17 Mar 20:53] Philip Olson
Posted by developer:
 
Several bugs and work logs (including this one) were merged into one 8.0.24 release note:

    Removed Python 2.7 and 3.5 support, and added Python 3.9
    support.

Thank you for the bug report!
[11 Apr 17:35] Uros Petrovic
Hello, can you please tell me when 8.0.24 is expected to be released?
Thanks in advance