Brew install mysql mac osx yosemite11/27/2023 ![]() I had been debugging this problem forever - 3 hours 17 mins. I hoped I helped, and would be happy to know if any of this worked, or not. 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. Note2: Also, make sure to try running the commands as root. Note1: I've seen some people saying that installing python-dev and libmysqlclient-dev also helped, however I do not know if these packages are available on Mac OS. If all above steps fail, then you could try installing 'mysql' using MacPorts, in which case the file 'mysql_config' would actually be called 'mysql_config5', and in this case, you would have to do this after installing: export PATH=$PATH:/opt/local/lib/mysql5/bin. Manually find the location of 'mysql/bin', 'mysql_config', and 'MySQL-Python', and add all these to the $PATH environment variable. More information on this can be found here and here. Instead of using MySQL-Python, try using 'mysql-connector-python', it can be installed using pip install mysql-connector-python. The path to this binary needs to be either in your shell's $PATH environment variable, or it needs to be explicitly in the setup.py file for the module assuming it's looking in some specific place for that file. Try running locate mysql_config and see if anything comes back. That's why the build isn't finding it either. Try running which mysql_config from bash. So, you followed the steps, and you're still geting an error, well, there are a few things you could try: 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. And finally, you did pip install MySQL-Python (or pip3 install mysqlclient if using python 3).You did export PATH=$PATH:/usr/local/mysql/bin.Ok, well, first of all, let me check if I am on the same page as you: I've already tried running: export PATH=$PATH:/usr/local/mysql/binīut that didn't seem to help, as I ran the installation command again and it still failed. I get an error stating: raise EnvironmentError("%s not found" % (mysql_config.path,)) ![]() Whenever I actually do try to install via: sudo pip install MySQL-python I actually tried uninstalling it and got this: Cannot uninstall requirement mysql-python, not installed I did some research and it all pointed to having to install Mysql-python, as apparently it isn't on my system. Improperl圜onfigured: Error loading MySQLdb module: No module named MySQLdb However, I haven't been able to get started as the server fails to start properly due to: Improperl圜onfigured("Error loading MySQLdb module: %s" % e) I am trying to use Django on a Google App Engine project. Pip install mysql-python fails with EnvironmentError: mysql_config not found ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |