[TxMt] SQL Problems

Matthew Anderson manders2k.lists at gmail.com
Wed Oct 18 19:47:26 UTC 2006


I don't think that MySQLdb is installed on the default build of  
python that ships with OS X.  If:

   > python
   ...
   >>> import MySQLdb

throws an ImportError exception, it's probably not installed.

I bet it's pretty easy to build the module yourself, I think the  
project page is [1].  I haven't done it, but it's very likely just un- 
tar it, and do a "sudo python setup.py install".

A newer version of Python (2.4.3) and MySQLdb are both nicely  
packaged for the Mac at [2].  I don't think you can use the nice  
packaged version of MySQLdb without installing the Python 2.4 package  
as well (though I've never tried).

There isn't any reason *not* to install the newer python though,  
unless you make use the proprietary Apple python extensions that tie  
into the Cocoa libraries.  Even if you do, you can still call up the  
Apple packaged python with the shell command "python2.3".

[1] http://sourceforge.net/projects/mysql-python
[2] http://pythonmac.org/packages/py24-fat/index.html

On Oct 18, 2006, at 12:17 PM, Jasper van der Meulen wrote:

> I don;t know why ..
> but it doesn't look installed.
>
> if i do
> python ./tableBrowser.py --server=mysql
> in the SQL.tmbundle/Support/bin
> It returns the error:
> MySQLdb module is not installed
> Traceback (most recent call last):
>   File "./tableBrowser.py", line 284, in ?
>
> ps: i'm on a Intel
>
>
> On 28-aug-2006, at 22:33, Mark Lacas wrote:
>
>> Hmmm,
>>   Any idea why MySQLdb isn't working from TextMate then?
>> I ran all the MySQL tests that came with the module and they passed.
>> ml
>>
>> On Aug 28, 2006, at 1:16 PM, Derek Belrose wrote:
>>
>>> Mark Lacas wrote:
>>>> I note that the first line of tablebrowser.py is:
>>>> #!/usr/bin/env python
>>>>
>>>> My python is at:
>>>> /usr/bin/python
>>> #!/usr/bin/env python will work at that location because env  
>>> returns the
>>> location that it finds the binary "python" at.
>>> In your case it will return "/usr/bin/python"
>>>
>>> -Derek
>>>
>>> ____________________________________________________________________ 
>>> __
>>> For new threads USE THIS: textmate at lists.macromates.com
>>> (threading gets destroyed and the universe will collapse if you  
>>> don't)
>>> http://lists.macromates.com/mailman/listinfo/textmate
>>>
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

--
  Matt Anderson





More information about the textmate mailing list