Re: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread Trent Mick
[Brett Powley wrote]
> I have ActivePython 2.4.2.10 for Mac OS X (Intel) installed, and am  
> attempting to use MySQLdb (http://sourceforge.net/projects/mysql- 
> python/) 1.2.1c7.  I get the following error when trying to import  
> the module:
> 
> Traceback (most recent call last):
> File "foobar.py", line 12, in ?
> import MySQLdb
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
> site-packages/MySQLdb/__init__.py", line 19, in ?
> import _mysql
> ImportError: Failure linking new module: /Library/Frameworks/ 
> Python.framework/Versions/2.4/lib/python2.4/site-packages/_mysql.so:  
> Symbol not found: _mysql_get_host_info
> Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/ 
> lib/python2.4/site-packages/_mysql.so
> Expected in: dynamic lookup
> 
> This works with no problems on:
> - Mac OS X (PowerPC)
> - Mac OS X (Intel), using Apple's bundled version of Python
> 
> Is this an issue with ActivePython on Intel, or is it something to do  
> with the way that MySQLdb is built?

That may be because you are trying to use a python built just for Intel
(ActivePython) with an extension module built just for PowerPC
(_mysql.so). What does this yield:

file 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_mysql.so

I'm not sure that this is the problem, though.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



Re: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread Brett Powley

On 11/03/2006, at 4:17 AM, Trent Mick wrote:
That may be because you are trying to use a python built just for  
Intel

(ActivePython) with an extension module built just for PowerPC
(_mysql.so). What does this yield:

file /Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/_mysql.so


I'm not sure that this is the problem, though.



On 11/03/2006, at 1:51 AM, McNeill, David (GE Comm Fin) wrote:
Two different builds of Python and a "Symbol not found" error? Yes,  
that sounds like an OS(Platform)/Build mismatch.



I perhaps should have mentioned that I built the MySQLdb extension on  
Intel too:


brett$ cd /Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages

brett$ file _mysql.so
_mysql.so: Mach-O bundle i386


(The two different builds of Python - Apple's and ActiveState -  
aren't interfering with each other.)






--
Brett Powley -- PhD Candidate
Centre for Language Technology, Macquarie University,  Australia
w: http://www.ics.mq.edu.au/~bpowley
faciendi plures libros nullus est finis
frequensque meditatio carnis adflictio est
--




___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



Re: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread Trent Mick
[Brett Powley wrote]
> On 11/03/2006, at 4:17 AM, Trent Mick wrote:
> >That may be because you are trying to use a python built just for  
> >Intel
> >(ActivePython) with an extension module built just for PowerPC
> >(_mysql.so). What does this yield:
> >
> >file /Library/Frameworks/Python.framework/Versions/2.4/lib/ 
> >python2.4/site-packages/_mysql.so
> >
> >I'm not sure that this is the problem, though.
> 
> 
> On 11/03/2006, at 1:51 AM, McNeill, David (GE Comm Fin) wrote:
> >Two different builds of Python and a "Symbol not found" error? Yes,  
> >that sounds like an OS(Platform)/Build mismatch.
> 
> 
> I perhaps should have mentioned that I built the MySQLdb extension on  
> Intel too:
> 
> brett$ cd /Library/Frameworks/Python.framework/Versions/2.4/lib/ 
> python2.4/site-packages
> brett$ file _mysql.so
> _mysql.so: Mach-O bundle i386
> 
> 
> (The two different builds of Python - Apple's and ActiveState -  
> aren't interfering with each other.)


Apple's Python is 2.3, right? Just confirming that you built MySQLdb
separately for the two Pythons (Apple's, 2.3, and ActivePython, 2.4).


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



Re: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread Brett Powley
Yes, I've built them separately for each Python.  The MySQLdb  
setup.py script uses whichever one is found in the PATH first to  
build and install.  It definitely builds and installs into /Library/ 
Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages.  And it's definitely built with the gcc 4 compiler for Intel.


On 11/03/2006, at 9:48 AM, Trent Mick wrote:


Apple's Python is 2.3, right? Just confirming that you built MySQLdb
separately for the two Pythons (Apple's, 2.3, and ActivePython, 2.4).


Trent

--
Trent Mick
[EMAIL PROTECTED]



___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



RE: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread McNeill, David \(GE Comm Fin\)
>I perhaps should have mentioned that I built the MySQLdb extension on  
>Intel too:
>
>(The two different builds of Python - Apple's and ActiveState -  
>aren't interfering with each other.)

I never thought the two versions were interfering with each other. And, it's 
not so much a question of where you built it as whether you built it with the 
right source files. Perhaps I'm pursuing undomesticated waterfowl but, in the 
MS world of C/C++, when you get an error about a missing symbol, it means 
you're either missing a file, have it in the wrong place, or have the wrong 
version of one (or more).

___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



Re: ActivePython 2.4.2.10, Mac OS X (Intel) problems

2006-03-10 Thread Trent Mick

[Brett Powley wrote]
> ...
> ImportError: Failure linking new module: /Library/Frameworks/
> Python.framework/Versions/2.4/lib/python2.4/site-packages/_mysql.so:
> Symbol not found: _mysql_get_host_info
> Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/
> lib/python2.4/site-packages/_mysql.so
> Expected in: dynamic lookup
> ...

Well aren't MySQLdb's instructions for MySQL version compat just fun. :)

+ MySQL 3.23.32 or higher
  * http://www.mysql.com/downloads/
  * Versions lower than 3.22 definitely WON'T WORK.
  * Versions lower than 3.22.19 might not work.
  * MySQL-3.22 is deprecated in favor of 3.23, but still supported.
  * MySQL-3.23 is supported, but slightly deprecated.
  * MySQL-4.0 is supported.
  * MySQL-4.1 is mostly supported; the new prepared statements API
is not yet supported, and probably won't be until MySQLdb-1.3 or 2.0.
  * MySQL-5.0 and newer are not currently supported, but might work.

Brett,
Which version of MySQL are you building against? Did you build MySQL yourself
or get a prebuild from somewhere? If so where? Fink? Darwin Ports? mysql.com?
other?

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
___
ActivePython mailing list
ActivePython@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython