I need mysql-python on my CentOS 7 server to run a script I wrote. I haven't found any success installing it I always get the following error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-
build-mpl_yksf/mysql-python/
I am running CentOS 7 and accessing my machine through ssh.
I have tried the following:
-Installing mysql-python on Centos
-can't install MySQL-Python
python-dev is installed hopefully for the right version of python, gcc is also installed in fact I run:
# yum groupinstall "Developper Tools"
-mysql_config not found when installing mysqldb python interface
Tried the solution provided here to install the package directly in the same directory as python 3.7 instead of the default one which was the one containing python 2.7:
https://unix.stackexchange.com/questions/323532/yum-install-package-name-to-different-directory
I
# yum --installroot=/usr/local/bin/ --releasever=/ install MySQL-python
Per this I can't simply uninstall python 2.6:
-How to uninstall Python2.6
And I don't think simply creating an alias will solve my problem generally python 3 launches automatically not python 2 but my problem is regarding mysql-python
Essentially I think I have narrowed it down to the fact that I don't have mysql-python accessible to pthon 3.7 for some reason. It seems my 2 versions of python are somehow conflicting. I am wondering what I can do to fix this ? Before you suggest I tried running my program through python 2 but some exceptions I have to catch were not yet available.
All I want to do is get rid of this error message:
ModuleNotFoundError: No module named 'mysql'
Could someone please help me ? I wasn't sure whether it was better to post in unix.stackexchange.com but it seems appropriate to stackoverflow