python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version

These errors are usually caused by the lack mysql client dev files

If using mariadb install this:

apt-get install libmariadbclient-dev

 

If using mysql install this:

apt-get install libmysqlclient-dev

 

 

pip3 install mysql
The directory '/root/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/root/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mysql
  Downloading https://files.pythonhosted.org/packages/9a/52/8d29c58f6ae448a72fbc612955bd31accb930ca479a7ba7197f4ae4edec2/mysql-0.0.3-py3-none-any.whl
Collecting mysqlclient (from mysql)
  Downloading https://files.pythonhosted.org/packages/50/5f/eac919b88b9df39bbe4a855f136d58f80d191cfea34a3dcf96bf5d8ace0a/mysqlclient-2.1.1.tar.gz (88kB)
    100% |████████████████████████████████| 92kB 5.5MB/s
    Complete output from command python setup.py egg_info:
    /bin/sh: 1: mysql_config: not found
    /bin/sh: 1: mariadb_config: not found
    /bin/sh: 1: mysql_config: not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs
    Traceback (most recent call last):
      File "", line 1, in
      File "/tmp/pip-install-twfzngc5/mysqlclient/setup.py", line 15, in
        metadata, options = get_config()
      File "/tmp/pip-install-twfzngc5/mysqlclient/setup_posix.py", line 70, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-install-twfzngc5/mysqlclient/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-twfzngc5/mysqlclient/


Tags:

python, mysql, install, bin, sh, mysql_config, mariadb_config, versionthese, errors, dbconfig, debian, ubuntu, mariadb, apt, libmariadbclient, dev, libmysqlclient, pip, directory, cache, http, user, disabled, permissions, executing, sudo, caching, collecting, downloading, https, pythonhosted, org, packages, ae, fbc, bd, accb, ca, edec, py, whl, mysqlclient, eac, df, bbe, cfea, dcf, bf, tar, gz, kb, mb, output, egg_info, libs, traceback, quot, tmp, twfzngc, metadata, get_config, setup_posix, oserror, format, _mysql_config_path,

Latest Articles

  • How To Emulate Android in Linux
  • How to use KVM and GUI inside Docker
  • python spacey ERROR: No matching distribution found for thinc<8.4.0,>=8.3.12
  • Debian 11 security repo fixes due to EOL
  • MySQL vs MariaDB how to create a socket user tutorial
  • Ubuntu Linux Mint Desktop Dark Black Cannot See Solution
  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P
  • Linux Gnome Desktop Ubuntu Mint Debian Gets Slower After Weeks