<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Open Discussion</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/</link><description>Recent posts to Open Discussion</description><atom:link href="https://sourceforge.net/p/mysql-python/discussion/70460/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 16 Nov 2012 15:43:25 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mysql-python/discussion/70460/feed.rss" rel="self" type="application/rss+xml"/><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>I'm pretty sure he's not using homebrew or MacPorts.

I'm not sure what the "right way" to solve this problem is, but, could you post the output of running mysql_config?
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy Dustman</dc:creator><pubDate>Fri, 16 Nov 2012 15:43:25 -0000</pubDate><guid>https://sourceforge.net8f4befe8c02920dab5e0cc88c10a1486fef7cb55</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>I did this:
1. uninstall MySQL and mysql-python
2. reinstall MySQL 64-bit
3. reinstall mysql-python
(at this point, the django syncdb command was failing due to a missing library, libmysqlclient.18.dylib)
4. added environment variable DYLD_LIBRARY_PATH=/usr/local/mysql...../lib, to point to the directory containing the missing dylib

With those changes, the django syncdb command is now working correctly with a mysql database.

Thanks for your help.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ralph Grove</dc:creator><pubDate>Fri, 16 Nov 2012 14:54:36 -0000</pubDate><guid>https://sourceforge.net49ae490f7aa68af8b1fc0bcf3de832963bf76bbb</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>I knew there had to be a fat binary in there somewhere... So you are linked against an i386 MySQL library. I think if you get the 64-bit MySQL build, your problem will go away.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy Dustman</dc:creator><pubDate>Fri, 16 Nov 2012 03:31:10 -0000</pubDate><guid>https://sourceforge.net9bb7b829835d1e748935de72d3d84679a51ee5f3</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>The MySQL installer I used is: mysql-5.5.28-osx10.6-x86.dmg

python supports both architectures, and the other two are i386. I also tried running Python with "arch -i386 python", but it made no difference

 file `which python`
/usr/bin/python: Mach-O universal binary with 2 architectures
/usr/bin/python (for architecture i386):	Mach-O executable i386
/usr/bin/python (for architecture x86_64):	Mach-O 64-bit executable x86_64
ip96-62:mysite groverf$ file `which mysql`
/Users/groverf/bin/mysql: POSIX shell script text executable
ip96-62:mysite groverf$ file /usr/local/mysql/bin/mysql
/usr/local/mysql/bin/mysql: Mach-O executable i386
ip96-62:mysite groverf$ file /Library/Python/2.7/site-packages/_mysql.so
/Library/Python/2.7/site-packages/_mysql.so: Mach-O bundle i386
ip96-62:mysite groverf$ </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ralph Grove</dc:creator><pubDate>Fri, 16 Nov 2012 02:44:28 -0000</pubDate><guid>https://sourceforge.net7bb4c393f1c523045623657dd02bbaa4edd8a0fa</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>Well, it's definitely odd. Can you try creating a virtualenv environment and installing MySQLdb in there?

Are you sure your MySQL installation is correct? If you downloaded from http://www.mysql.com/downloads/mysql/#downloads specifically which one? You need to make sure the architecture of Python and MySQL match. Probably the best way to test this is with the following commands:

    $ file `which python`
    $ file `which mysql` # or mysql_config
    $ file /Library/Python/2.7/site-packages/_mysql.so

They should either all be x86-64 or i386 but not a mix.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy Dustman</dc:creator><pubDate>Fri, 16 Nov 2012 01:39:39 -0000</pubDate><guid>https://sourceforge.netfa51216fcbd4ffe9a2a1ab82118bcba765cdb9b5</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>I originally downloaded v1.2.4b4 from https://sourceforge.net/projects/mysql-python/ and then executed build and install commands.

I just tried uninstalling and reinstalling with pip, which upgraded it to v1.2.4c1. However, the problem is still there. This is the output of an attempt to build a mysql database using django.

ip96-62:mysite groverf$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/syncdb.py", line 8, in &lt;module&gt;
    from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
  File "/Library/Python/2.7/site-packages/django/core/management/sql.py", line 6, in &lt;module&gt;
    from django.db import models
  File "/Library/Python/2.7/site-packages/django/db/__init__.py", line 40, in &lt;module&gt;
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/Library/Python/2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/Library/Python/2.7/site-packages/django/db/utils.py", line 92, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/Library/Python/2.7/site-packages/django/db/utils.py", line 24, in load_backend
    return import_module('.base', backend_name)
  File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Library/Python/2.7/site-packages/django/db/backends/mysql/base.py", line 16, in &lt;module&gt;
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Library/Python/2.7/site-packages/_mysql.so, 2): no suitable image found.  Did find:
	/Library/Python/2.7/site-packages/_mysql.so: mach-o, but wrong architecture</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ralph Grove</dc:creator><pubDate>Thu, 15 Nov 2012 23:48:47 -0000</pubDate><guid>https://sourceforge.net40f48dc70b7a950c49f6efdedb55876b59f6d2ac</guid></item><item><title>wrong architecture error</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/43053990/</link><description>How did you install it? 1.2.4b4 is out of date. I recommend you use:

$ pip install MySQL-python

This will ensure you get the latest release candidate. And if you don't have pip:

http://www.pip-installer.org/en/latest/</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy Dustman</dc:creator><pubDate>Thu, 15 Nov 2012 23:19:35 -0000</pubDate><guid>https://sourceforge.net763d6faac9b7c65b1da0d50f1450c92b3a4aed6b</guid></item><item><title>Chokes during install on Mac OS X Server 10.6.8</title><link>https://sourceforge.net/p/mysql-python/discussion/70460/thread/b6016426/</link><description>Oh, sorry. Didn't see all th other threads. I'll post the error messages first. </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Holland, M.D.</dc:creator><pubDate>Mon, 08 Oct 2012 00:01:09 -0000</pubDate><guid>https://sourceforge.net595f5f6eceb95f3362721505d849bd8113818f2e</guid></item></channel></rss>