![how to use mysql on mac python how to use mysql on mac python](https://i.ytimg.com/vi/g60QghtJmjY/maxresdefault.jpg)
(I have also accidentally downloaded and installed mysql-5.1.) Downloaded and installed mySQL-python-1.2. So far I have: Downloaded and installed mysql-5.5.
How to use mysql on mac python mac os x#
When it's done: $ /opt/local/bin/python2.6 -c "import MySQLdb print(MySQLdb.version_info)" I simply want to install MySQL on my Mac (running Mac OS X 10.6.5 (Snow Leopard)) for use with Python. Then you can install everything you need with one command: $ sudo port install py26-mysql If you have installed it already, then do this to make sure the list of ports is up-to-date: $ sudo port selfupdate If you haven't already installed its base files, follow the instructions here. That makes even more sense if you are going to be installing more packages. Or you could do yourself a favor and install everything from a 3rd-party package manager, like MacPorts, Fink, or Homebrew.
![how to use mysql on mac python how to use mysql on mac python](https://cdn.activestate.com/wp-content/uploads/2009/05/how-install-mysql-python-mac-osx-blog-hero.jpg)
To use MySQL with our django project, we will need a Python 3 database connector library compatible with Django. Install MySQL Database Connector and edit Settings. We could debug each step along the way to do that you are going to need to supply more information. means the current working directory, otherwise, it will look like this blog/blog. But there are a lot of pieces and, especially on OS X 10.6 and its preference for running in 64-bit, it can be difficult to get everything right. It is certainly possible to make it all work by yourself. It doesn't mean much to me, though I'm guessing the second-to-last one explains why Python is not where it should be. Log for db46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_release_ports_databases_db46/main.logĮrror: The following dependencies were not installed: py26-distribute python26 db46 gdbm gettext expat libiconv gperf sqlite3Įrror: Status 1 encountered during processing.
How to use mysql on mac python for mac os x#
I got the following error messages.Įrror: db46 requires the Java for Mac OS X development headers.Įrror: Download the Java Developer Package from: Įrror: Target returned: missing Java headers Okay, so I tried the MacPorts install, but still it is not working. bash_profile: īut when I run: import mySQLdb in terminal, I am met with the following message: (I have also accidentally downloaded and installed )ĭownloaded and installed Īdded the following to my. I simply want to install MySQL on my Mac (running Mac OS X 10.6.5 (Snow Leopard)) for use with Python.ĭownloaded and installed.