Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install throws error - bin/sh: 1: mysql_config: not found #329

Open
rohan-paul opened this issue Jun 3, 2022 · 3 comments
Open

pip install throws error - bin/sh: 1: mysql_config: not found #329

rohan-paul opened this issue Jun 3, 2022 · 3 comments

Comments

@rohan-paul
Copy link

After running pip install pattern getting below error

paul@paul-B85M-D3H:~$ pip install pattern
Defaulting to user installation because normal site-packages is not writeable
Collecting pattern
  Using cached Pattern-3.6.0.tar.gz (22.2 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from pattern) (0.18.2)
Collecting backports.csv
  Using cached backports.csv-1.0.7-py2.py3-none-any.whl (12 kB)
Collecting mysqlclient
  Using cached mysqlclient-2.1.0.tar.gz (87 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /bin/sh: 1: mysql_config: not found
      /bin/sh: 1: mariadb_config: not found
      /bin/sh: 1: mysql_config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-qybufuhd/mysqlclient_ad587186f3304bbba8c6f9984564fb73/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/tmp/pip-install-qybufuhd/mysqlclient_ad587186f3304bbba8c6f9984564fb73/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/tmp/pip-install-qybufuhd/mysqlclient_ad587186f3304bbba8c6f9984564fb73/setup_posix.py", line 31, in mysql_config
          raise OSError("{} not found".format(_mysql_config_path))
      OSError: mysql_config not found
      mysql_config --version
      mariadb_config --version
      mysql_config --libs
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: There was an error checking the latest version of pip.


@dcsuka
Copy link

dcsuka commented Aug 28, 2022

Exactly the same issue for me, Mac M1, Python 3.9.10.

EDIT: installing via conda-forge worked for me: conda install -c conda-forge pattern.

@ndvbd
Copy link

ndvbd commented Dec 5, 2022

Same issue

@ClaudiaShu
Copy link

Exactly the same issue for me, Mac M1, Python 3.9.10.

EDIT: installing via conda-forge worked for me: conda install -c conda-forge pattern.

Thanks! Same issue here and this works for me. Linux, Python 3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants