Bug #81203 Connector / Python doesn't support pip installation
Submitted: 26 Apr 2016 15:47 Modified: 28 Apr 2016 7:10
Reporter: Roberto Polli Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / Python Severity:S2 (Serious)
Version:2.1.3 OS:Any
Assigned to: CPU Architecture:Any

[26 Apr 2016 15:47] Roberto Polli
Description:
mysql-connector-python can't be installed with pip.

pip uses setuptools.

setuptools is now the preferred way for python packaging, and it allows both install and uninstall.

mysql-connector-python uses directly distutils - which is limiting. 

How to repeat:

# pip install https://github.com/mysql/mysql-connector-python/archive/master.zip
Complete output from command /home/rpolli/workspace-py/mysql-connector-python/.tox/py27/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-_liMFP-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dJ_jiD-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rpolli/workspace-py/mysql-connector-python/.tox/py27/include/site/python2.7/mysql-connector-python:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --single-version-externally-managed not recognized

Suggested fix:
Use setuptools when possible.

Fallback to distutils when setuptools is not available.
[26 Apr 2016 15:58] Roberto Polli
See https://github.com/mysql/mysql-connector-python/pull/16
[28 Apr 2016 7:10] Chiranjeevi Battula
Hello Roberto Polli,

Thank you for the bug report.
This duplicate of Bug #79766, Please see Bug #79766.

Thanks,
Chiranjeevi.