Oserror: mysql_config not found mac
First off, yeah, I've already seen this: pip install mysql-python fails with EnvironmentError: mysql_config not found The problem I am trying to use Django on a Google App Engine project. However, I haven't been able to get started as the server fails to start properly due to:
I did some research and it all pointed to having to install Mysql-python, as apparently it isn't on my system. I actually tried uninstalling it and got this:
Whenever I actually do try to install via:
I get an error stating:
I've already tried running:
but that didn't seem to help, as I ran the installation command again and it still failed. Any ideas? Please note I'm not in a virtualenv.
asked Aug 23, 2014 at 7:08
daniel_c05daniel_c05 11.3k17 gold badges59 silver badges77 bronze badges 1
Ok, well, first of all, let me check if I am on the same page as you:
If you did all those steps in the same order, and you still got an error, read on to the end, if, however, you did not follow these exact steps try, following them from the very beginning. So, you followed the steps, and you're still geting an error, well, there are a few things you could try:
Note1: I've seen some people saying that installing Note2: Also, make sure to try running the commands as root. I got my answers from (besides my brain) these places (maybe you could have a look at them, to see if it would help): 1, 2, 3, 4. I hoped I helped, and would be happy to know if any of this worked, or not. Good luck.
Vadorequest 15k22 gold badges108 silver badges203 bronze badges answered Aug 25, 2014 at 17:19 14 I had been debugging this problem forever - 3 hours 17 mins. What particularly annoyed me was that I already had sql installed on my system through prior uni work but pip/pip3 wasn't recognising it. These threads above and many other I scoured the internet for were helpful in eluminating the problem but didn't actually solve things. ANSWER Pip is looking for mysql binaries in the Homebrew Directory which is located relative to Macintosh HD @
so I found that this requires you making a few changes step 1: Download MySql if not already done so https://dev.mysql.com/downloads/ Step 2: Locate it relative to Macintosh HD and cd
Step 3: Once there open terminal and use a text editor of choice - I'm a neovim guy myself so I typed (doesn't automatically come with Mac... another story for another day)
Step 4: You will see at approx line 112
Change to
*you'll notice that this file has read-only access so if your using vim or neovim
Step 5: Head to the home directory and edit the .bash_profile file
Then
and add
to the file then save Step 6: relative to Macintosh HD locate paths and add to it
then
and add
*you'll again notice that this file has read-only access so if your using vim or neovim
then
then refresh the terminal with your changes by running
Finally
And Viola. Remember it's a vibe.
answered Jun 21, 2018 at 15:48
2 If you don't want to install full mysql, we can fix this by just installing mysqlclient
Close terminal and start new terminal and proceed with answered Nov 1, 2018 at 19:34
ArunArun 7361 gold badge11 silver badges18 bronze badges 1 I am running Python 3.6 on MacOS Catalina. My issue was that I tried to install This is the steps I took to solve the issue.
answered Nov 4, 2019 at 15:10
azmirfakkriazmirfakkri 5415 silver badges18 bronze badges 1 Also this happens when I was installing mysqlclient,
As user3429036 said,
answered Aug 8, 2017 at 14:36
AndreAndre 5,3714 gold badges27 silver badges39 bronze badges If you have installed mysql using Homebrew by specifying a version then mysql_config would be present here. - /usr/local/Cellar//5.6.47/bin you can find the path of the sql bin by using ls command in /usr/local/ directory
Add the path to bash profile like this.
answered Jan 28, 2020 at 11:56
answered Oct 8, 2020 at 4:04
This answer is for MacOS users who did not install from
What you have to do is appending the MySQL
You should then reload your
Before installing
Follow their directions to sign away your family, after which you should be able to install
After installing that, you must do one more thing to fix a runtime bug that ships with MySQL (Dynamic Library
answered Sep 21, 2019 at 15:58
Zhanwen ChenZhanwen Chen 1,15915 silver badges19 bronze badges 1 The problem in my case was that I was running the command inside a python virtual environment and it didn't had the path to /usr/local/mysql/bin though I have put it in the .bash_profile file. Just exporting the path in the virtual env worked for me. For your info sql_config resides inside bin directory. answered Jul 22, 2020 at 12:49
Install brew or apt-get is also not easy for me so I downloaded mysql via: https://dev.mysql.com/downloads/connector/python/, installed it. So I can find mysql_config int this directory: /usr/local/mysql/bin the next step is:
Draken 3,15913 gold badges35 silver badges52 bronze badges answered Apr 19, 2017 at 10:03
|