Oct-17-2017, 08:47 PM
I'm trying to install the mysqlclient with Pip, and get an error as follows.
These are my versions:
$ pip3.4 install mysqlclient Downloading/unpacking mysqlclient Downloading mysqlclient-1.3.12.tar.gz (89kB): 89kB downloaded Running setup.py (path:/tmp/pip_build_root/mysqlclient/setup.py) egg_info for package mysqlclient /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip_build_root/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip_build_root/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r") File "/tmp/pip_build_root/mysqlclient/setup_posix.py", line 26, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) OSError: mysql_config not found Complete output from command python setup.py egg_info: /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip_build_root/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "/tmp/pip_build_root/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r") File "/tmp/pip_build_root/mysqlclient/setup_posix.py", line 26, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) OSError: mysql_config not found ---------------------------------------- Cleaning up...From what I could tell, this means it's missing a library, so I downloaded and installed the RPMs for the Python and C++ libraries from Oracle's site. These are the mysql RPMs installed on the system:
$ rpm -qa | grep -i mysql mysql-connector-python-2.1.7-1.el6.x86_64 MySQL-server-advanced-5.6.30-1.el6.x86_64 mysql-connector-c++-1.1.9-1.x86_64 MySQL-client-advanced-5.6.30-1.el6.x86_64 MySQL-python-1.2.3-0.3.c1.1.el6.x86_64 MySQL-shared-compat-advanced-5.6.22-1.el6.x86_64Yet, it seems that mysql_config still not installed, and so is not found:
$ locate mysql_config /usr/bin/mysql_config_editor /usr/share/man/man1/mysql_config_editor.1.gzNote that some sites say to install libmysqlclient-dev, which I think would apply if I'm installing the RPMs from Redhat. But my departmental standard is to use the ones supplied by Oracle, which are the ones that appear above.
These are my versions:
$ pip3.4 -V pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4) $ python3.4 -V Python 3.4.2Anybody know which RPM I need to install?