question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SQL config error on Mac OSX installation

See original GitHub issue

With Python3 and pip3 on Mac OSX, there’s a sql config error

$ sudo pip3 install -U https://github.com/clips/pattern/archive/development.zip

Collecting https://github.com/clips/pattern/archive/development.zip
  Downloading https://github.com/clips/pattern/archive/development.zip (24.8MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 24.8MB 40kB/s 
Collecting future (from Pattern==2.6)
  Downloading future-0.16.0.tar.gz (824kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 829kB 850kB/s 
Collecting backports.csv (from Pattern==2.6)
  Downloading backports.csv-1.0.5-py2.py3-none-any.whl
Collecting mysqlclient (from Pattern==2.6)
  Downloading mysqlclient-1.3.12.tar.gz (89kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 92kB 2.5MB/s 
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-c2voibrz/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "/private/tmp/pip-build-c2voibrz/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/private/tmp/pip-build-c2voibrz/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-c2voibrz/mysqlclient/

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:7
  • Comments:11

github_iconTop GitHub Comments

52reactions
curiousrohancommented, Mar 3, 2018

I had the same error in MacOS High Sierra Doing: brew install mysql PATH=$PATH:/usr/local/mysql/bin solved the problem

7reactions
evanmiltenburgcommented, Oct 23, 2018

Because I don’t need the database feature, I bluntly solved the issue by commenting out line 140 in setup.py. So this:

    install_requires = [
        "future",
        "backports.csv",
        "mysqlclient",
        "beautifulsoup4",
        "lxml",
        "feedparser",
        "pdfminer" if sys.version < "3" else "pdfminer.six",
        "numpy",
        "scipy",
        "nltk",
        "python-docx",
        "cherrypy",
        "requests"
    ],

Becomes:

    install_requires = [
        "future",
        "backports.csv",
#        "mysqlclient",
        "beautifulsoup4",
        "lxml",
        "feedparser",
        "pdfminer" if sys.version < "3" else "pdfminer.six",
        "numpy",
        "scipy",
        "nltk",
        "python-docx",
        "cherrypy",
        "requests"
    ],

This way, python setup.py install runs without any errors. It’s not pretty but it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Server giving error - Microsoft Q&A
There is nothing to fix, SQL Server isn't supported on Mac OS with M1. Create a Windows OS Virtual Machine or get a...
Read more >
How to Install SQL Server on MacOS - phoenixNAP
In this tutorial, we take you through the step-by-step process of installing SQL Server 2019 on macOS as a Docker deployment.
Read more >
If an error occurred while updating or installing macOS
Check your internet connection Β· Install in safe mode Β· Install after repairing your disk Β· Install from macOS Recovery Β· Install after...
Read more >
How to install SQL Server on Mac - Setapp
We will look into installing SQL Server for Mac, connecting to a database, ... and move the thumb from the default setting of...
Read more >
Issue installing Oracle SQL Developer on my MacBookPro
Go to Tools > Preferences > Database > Advanced, and make sure Use OCI/Thick driver is un-checked. SQL Developer in Mac OS X....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found