Updated to OSX 10.11 El Capitan, can no longer use MySQL with Python / Django

I have a Python / Django project that I manage with PyCharm. Everything worked fine under Mac OSX Yosemite. This morning I upgraded to the latest version of El Capitan, now I can not start the project. The error I am getting is:

Error loading MySQLdb module: no module named MySQLdb

I tried all the suggestions from past questions, but no one resolved this. The most common assumption is as follows:

sudo pip install MySQL-python

When I do this, I get:

The requirement has already been met (use --upgrade to upgrade): MySQL-python in / Library / Python / 2.7 / site-packages

None of the other suggestions help. I can try reinstalling MySQL, but I don't think it broke MySQL. This may have something to do with permissions. Can anyone help me get back again?

+5
source share
2 answers

It happened to me. I uninstalled the package, installed mysql using Homebrew , and then reinstalled the package.

pip uninstall MySQL-python brew install mysql pip install MySQL-python 

If you are having problems with brew, be sure to check out their troubleshooting page on El Capitan .

+4
source

View this post: MySQL is misconfigured Reason: unsafe use of relative path

And if you updated Xcode, open 1 time Xcode to obtain a license.

+2
source

Source: https://habr.com/ru/post/1232667/


All Articles