Mysql.connector arbeitete wie erwartet in Python 2.6, aber da ich argparse verwenden wollte, installierte ich 2.7-Version. Ich stehe unten Fehler beim Installieren von Connector zu dieser Version. Ich bin mir nicht sicher, wie ich sie lösen soll.Probleme bei der Installation von mysql.connector in Python 2-7 nach der Migration von 2.6
**Error while importing connector:**
[/usr/local/bin ] # python
Python 2.7.6 (default, Apr 19 2016, 19:36:47)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mysql.connector
>>>
**Paths located**
[~ ] # which python2.6
/usr/bin/python2.6
[~ ] # which python2.7
/usr/local/bin/python2.7
[~ ] # which python
/usr/local/bin/python
[~ ] # ls -l /usr/local/bin/py*
-rwxr-xr-x 1 root root 84 Apr 19 18:10 /usr/local/bin/pydoc
lrwxrwxrwx 1 root root 18 Apr 19 21:57 /usr/local/bin/python -> /usr/bin/python2.6
lrwxrwxrwx 1 root root 9 Apr 19 18:10 /usr/local/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 6214541 Apr 19 19:36 /usr/local/bin/python2.7
-rwxr-xr-x 1 root root 1674 Apr 19 19:36 /usr/local/bin/python2.7-config
lrwxrwxrwx 1 root root 16 Apr 19 18:10 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 14 Apr 19 18:10 /usr/local/bin/python-config -> python2-config
[~ ] # pip -V
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)
**Trying to install mysql connector for python 2.7**
[/usr/src ] # rpm -i mysql-connector-python-2.0.4-1.el7.noarch.rpm
error: Failed dependencies:
python(abi) = 2.7 is needed by mysql-connector-python-2.0.4-1.el7.noarch