iekerop.blogg.se

Mac install mysql-python
Mac install mysql-python









  1. #MAC INSTALL MYSQL PYTHON HOW TO#
  2. #MAC INSTALL MYSQL PYTHON FOR MAC OS#
  3. #MAC INSTALL MYSQL PYTHON MAC OS X#

The fix is to use the ARCHFLAGS environment variable that distutils will pick up on to only build for your architecture: ARCHFLAGS=`arch` python setup.

mac install mysql-python

However, the MySQL you just installed is only for x86 so it borks. By default distutils (the library behind python setup.py build) tries to build binary Python extensions for all the same architectures. In any case the problem here is that my Python install (ActivePython 2.6) is a universal build (including i386 and ppc). I suspect they may not have hit this because they were building against the system Python (in /usr/bin/python, /System/Library/Frameworks/amework/Versions/Current) which may have some tweaks to just handle this. Install MySQL-Python (MySQLdb) on macOS JJTimmy Tin Mac OS, Python MySQLdb is an thread-compatible interface to the popular MySQL database server that provides the Python database API. I didn’t see this mentioned in others’ post on this. Ld: warning in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture This is a long way to do job, you may and here i will use the pip Python Package Index and PyMySQL. First things first you should download and install appropriate MySQL python connector for Windows/Linux/Mac OSx from here. I assume youre using python 3.5 or above. MySQLdb is a Python DB API-2.0-compliant interface see PEP-249 for details. Ld: warning in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture Here i describe the basics of connecting a MySQL server with python. MySQL database connector for Python programming. Ld: warning in build/temp.macosx-10.3-i386-2.6/_mysql.o, file is not of required architecture

  • Download the latest MySQL-python package.įor me this failed as follows: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.6/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-i386-2.6/_mysql.so.
  • For me this was the “Mac OS X 10.5 x86″ package: mysql-5.1. The following might work:

    #MAC INSTALL MYSQL PYTHON FOR MAC OS#

  • Download and install MySQL ‘pkg’ format install for Mac OS X.
  • Though I am using ActivePython, the issues should be the same for a Python from. What follows are the steps (slightly different) that I needed to get MySQL-python to install.

    mac install mysql-python

    #MAC INSTALL MYSQL PYTHON MAC OS X#

  • Install MySQL-python on Mac OS X (leopard).
  • #MAC INSTALL MYSQL PYTHON HOW TO#

    How to install Django with MySQL on Mac OS X.Here are some links that discuss getting MySQL-python to build on Mac OS X:

    mac install mysql-python

    Just a quick note on getting MySQL-python (aka import MySQLdb) 1.2.3c1 (the current latest version) to build and install on Mac OS X, because I hit something that I didn’t see mentioned in a number of similar posts.











    Mac install mysql-python