Hello, I'm trying to get the MySQL bundle working so I can browse tables.
I get this on my MacBook Pro: Traceback (most recent call last): File "/Applications/Document/ TextMate.app/Contents/SharedSupport/Bundles/SQL.tmbundle/Support/bin/ tableBrowser.py", line 284, in ? sys.exit(main()) File "/Applications/ Document/TextMate.app/Contents/SharedSupport/Bundles/SQL.tmbundle/ Support/bin/tableBrowser.py", line 109, in main listTables (dbName,dbHost,dbPort,serverType,passwd,dbUser) File "/Applications/ Document/TextMate.app/Contents/SharedSupport/Bundles/SQL.tmbundle/ Support/bin/tableBrowser.py", line 130, in listTables mycon = MySQLdb.connect(db=dbName,host=dbHost,port=int (dbPort),user=dbUser,passwd=passwd) NameError: global name 'MySQLdb' is not defined
I tried using tablebrowser.py standalone and it failed due to no MySQLdb module for Python. Downloaded and installed MySQLdb and now Python works properly with the module and MySQL.
Alas, TextMate still can't find MySQLdb and fails with the same error.
I note that the first line of tablebrowser.py is: #!/usr/bin/env python
My python is at: /usr/bin/python
Is TextMate using some other Python than my native one? If not, why can I interactively use Python with MySQL, but TextMate won't work.
I have all the TM environment variables set so I don't think that is it.
Thoughts?
Thanks, ml
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
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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
More info:
I finally got all the parameters right and ran tableBrowser.py from the command line (inside the TextMate bundle in the Appllications Folder). It can't find MySQLdb when run from the command line.
This is really odd. . .when I run Python alone from the command line, it works fine with MySQLdb. When I run tableBrowser.py, it can't find the module.
Any Python gurus out there that know what's going on? Thanks, ml
On Aug 28, 2006, at 1:33 PM, 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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Got it! Had to delete all the MySQL files in the TextMate Application bundle as they were probably not universal and were overriding the external modules for Python. It's now working. Thanks, ml
On Aug 28, 2006, at 1:47 PM, Mark Lacas wrote:
More info:
I finally got all the parameters right and ran tableBrowser.py from the command line (inside the TextMate bundle in the Appllications Folder). It can't find MySQLdb when run from the command line.
This is really odd. . .when I run Python alone from the command line, it works fine with MySQLdb. When I run tableBrowser.py, it can't find the module.
Any Python gurus out there that know what's going on? Thanks, ml
On Aug 28, 2006, at 1:33 PM, 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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Lucas, can you tell me where i can find them and wich ones i need to delete ?
i;ve got the same problem
TIA
On Aug 28, 2006, at 10:54 PM, Mark Lacas wrote:
Got it! Had to delete all the MySQL files in the TextMate Application bundle as they were probably not universal and were overriding the external modules for Python. It's now working. Thanks, ml
On Aug 28, 2006, at 1:47 PM, Mark Lacas wrote:
More info:
I finally got all the parameters right and ran tableBrowser.py from the command line (inside the TextMate bundle in the Appllications Folder). It can't find MySQLdb when run from the command line.
This is really odd. . .when I run Python alone from the command line, it works fine with MySQLdb. When I run tableBrowser.py, it can't find the module.
Any Python gurus out there that know what's going on? Thanks, ml
On Aug 28, 2006, at 1:33 PM, 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@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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
/Applications/TextMate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Support/bin
Remove the Folder called MySQLdb and all _mysql files.
Still can't get the database and column views to work. The links on the table view don't do anything either. I'll keep working on it to see if I can get it all going.
Who is the owner of this bundle and are there any docs for it? Thanks, ml
On Aug 28, 2006, at 1:58 PM, Jasper van der Meulen wrote:
Lucas, can you tell me where i can find them and wich ones i need to delete ?
i;ve got the same problem
TIA
On Aug 28, 2006, at 10:54 PM, Mark Lacas wrote:
Got it! Had to delete all the MySQL files in the TextMate Application bundle as they were probably not universal and were overriding the external modules for Python. It's now working. Thanks, ml
On Aug 28, 2006, at 1:47 PM, Mark Lacas wrote:
More info:
I finally got all the parameters right and ran tableBrowser.py from the command line (inside the TextMate bundle in the Appllications Folder). It can't find MySQLdb when run from the command line.
This is really odd. . .when I run Python alone from the command line, it works fine with MySQLdb. When I run tableBrowser.py, it can't find the module.
Any Python gurus out there that know what's going on? Thanks, ml
On Aug 28, 2006, at 1:33 PM, 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@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@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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
Updated to 2.4.3 and seperalty downloaded -> installed the MySQLdb Then a reboot then i did: laptop:~ jasper$ python Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import MySQLdb
So it didn't give any error .. but from Textmate it's still the same.
Then i extracted the content of the package en copied it to the / Applications/Apps/TextMate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Support/bin
fired textmate again, but still the same error.
On 18-okt-2006, at 21:47, Matthew Anderson wrote:
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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I don't have this bundle installed.
If you look at the tableBrowser.py file in the bundle editor, what does the first line say?
If it says "#!/usr/bin/python", this is hard coding the Apple- packaged version into the script.
You'll want it to instead say something like:
#!/usr/local/bin/python or #!/usr/local/bin/python2.4 or (my favorite): #!/usr/bin/env python
The last one, I believe, will execute whichever version of python is found first in your path. In my case, that would be "/usr/local/bin/ python" which is the same as "/usr/local/bin/python2.4".
On Oct 18, 2006, at 4:11 PM, Jasper van der Meulen wrote:
Updated to 2.4.3 and seperalty downloaded -> installed the MySQLdb Then a reboot then i did: laptop:~ jasper$ python Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import MySQLdb
So it didn't give any error .. but from Textmate it's still the same.
Then i extracted the content of the package en copied it to the / Applications/Apps/TextMate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Support/bin
fired textmate again, but still the same error.
On 18-okt-2006, at 21:47, Matthew Anderson wrote:
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@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@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
_ For new threads USE THIS: textmate@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
Matthew Anderson wrote:
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 verylikely 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
At this point I don't think there's any reason *not* to just install [Python 2.5][py25] from python.org, and then do the `sudo python setup.py install` routine. There are some nifty new things in python 2.5, and as far as I know, no issues running code for 2.3 or 2.4.
[py25]: http://www.python.org/download/releases/2.5/
-Jacob
Thanks, but that didn't workout :( I've Installed now: 2.4.3 (didnt work) 2.5 (didn work) An installation of MySQLdb (the package from http://pythonmac.org/ packages/py24-fat/index.html ) (didnt work on orignal python, 2.4.3, 2,5)
did a search on MySQLdb on my drive in the /usr dir .. found it :-) /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages there..and copied it into /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages But it all didn't work out ..
import MySQLdb
MySQLdb/__init__.py:19: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1013, module _mysql has version 1012.
Then i've installed gcc 4.0 from the developer package (XCode) Then i've downloaded the package from http://sourceforge.net/projects/ mysql-python and tried to compile /usr/bin/env gcc gives i686-apple-darwin8-gcc-4.0.1 Tried to compile ... didn't work out .. lot's of errors ..
Any tricks left ?
Regards J.
On 18-okt-2006, at 23:57, Jacob Rus wrote:
At this point I don't think there's any reason *not* to just install [Python 2.5][py25] from python.org, and then do the `sudo python setup.py install` routine. There are some nifty new things in python 2.5, and as far as I know, no issues running code for 2.3 or 2.4.
-Jacob
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
If you've installed the MySQLdb package from the pythonmac.org website, it should be installed under python2.4.
To make sure you're using the python 2.4 binary, change the #! line to:
#!/usr/local/bin/python2.4
If you've also installed python2.5, and haven't successfully installed MySQLdb under python2.5, your script might be using that instead. I don't know that copying the module from 2.4's site- packages into 2.5's site-packages will actually work. I kind of doubt it.
Also, if you're knowledgeable about python programming, actually use MySQLdb under whichever version it's supposed to be functioning (say, 2.4) to view the database. Make sure it's working by hand. That might be a little difficult to do, depending on your level of experience.
As far as setting the default version goes:
If you execute "echo $PATH" on the command line, does "/usr/local/ bin" appear in the list? Does it appear before "/usr/bin"?
To select which python is the default, assuming /usr/local/bin is the first directory in your path to contain a listing for "python", you've got to symlink /usr/local/bin/python to whichever version of python you want to be the default version. For example:
cd /usr/local/bin sudo rm python sudo ln -s python2.4 python
On Oct 18, 2006, at 6:08 PM, Jasper van der Meulen wrote:
Thanks, but that didn't workout :( I've Installed now: 2.4.3 (didnt work) 2.5 (didn work) An installation of MySQLdb (the package from http://pythonmac.org/ packages/py24-fat/index.html ) (didnt work on orignal python, 2.4.3, 2,5)
did a search on MySQLdb on my drive in the /usr dir .. found it :-) /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ site-packages there..and copied it into /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages But it all didn't work out ..
import MySQLdb
MySQLdb/__init__.py:19: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1013, module _mysql has version 1012.
Then i've installed gcc 4.0 from the developer package (XCode) Then i've downloaded the package from http://sourceforge.net/ projects/mysql-python and tried to compile /usr/bin/env gcc gives i686-apple-darwin8-gcc-4.0.1 Tried to compile ... didn't work out .. lot's of errors ..
Any tricks left ?
Regards J.
On 18-okt-2006, at 23:57, Jacob Rus wrote:
At this point I don't think there's any reason *not* to just install [Python 2.5][py25] from python.org, and then do the `sudo python setup.py install` routine. There are some nifty new things in python 2.5, and as far as I know, no issues running code for 2.3 or 2.4.
-Jacob
_ For new threads USE THIS: textmate@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
If i do: echo $PATH i get -> /Library/Frameworks/Python.framework/Versions/ Current/bin That was linked to 2.5 but i changed it to 2.4 i changed the things you asked.. but didn't gave me a solution .. i looked and looked again .. but found the answer
too make a long story short (i think)
Install Python 2.4.3 Install MySQLdb remove from /Applications/Apps/TextMate.app/Contents/SharedSupport/ Bundles/SQL.tmbundle/Support/bin/
MySQLdb _mysql.so _mysql_exceptions.py _mysql_exceptions.pyc _mysql_exceptions.pyo
Regards J.
On 19-okt-2006, at 1:42, Matthew Anderson wrote:
If you've installed the MySQLdb package from the pythonmac.org website, it should be installed under python2.4.
To make sure you're using the python 2.4 binary, change the #! line to:
#!/usr/local/bin/python2.4
If you've also installed python2.5, and haven't successfully installed MySQLdb under python2.5, your script might be using that instead. I don't know that copying the module from 2.4's site- packages into 2.5's site-packages will actually work. I kind of doubt it.
Also, if you're knowledgeable about python programming, actually use MySQLdb under whichever version it's supposed to be functioning (say, 2.4) to view the database. Make sure it's working by hand. That might be a little difficult to do, depending on your level of experience.
As far as setting the default version goes:
If you execute "echo $PATH" on the command line, does "/usr/local/ bin" appear in the list? Does it appear before "/usr/bin"?
To select which python is the default, assuming /usr/local/bin is the first directory in your path to contain a listing for "python", you've got to symlink /usr/local/bin/python to whichever version of python you want to be the default version. For example:
cd /usr/local/bin sudo rm python sudo ln -s python2.4 python
On Oct 18, 2006, at 6:08 PM, Jasper van der Meulen wrote:
Thanks, but that didn't workout :( I've Installed now: 2.4.3 (didnt work) 2.5 (didn work) An installation of MySQLdb (the package from http://pythonmac.org/ packages/py24-fat/index.html ) (didnt work on orignal python, 2.4.3, 2,5)
did a search on MySQLdb on my drive in the /usr dir .. found it :-) /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ site-packages there..and copied it into /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages But it all didn't work out ..
import MySQLdb
MySQLdb/__init__.py:19: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1013, module _mysql has version 1012.
Then i've installed gcc 4.0 from the developer package (XCode) Then i've downloaded the package from http://sourceforge.net/ projects/mysql-python and tried to compile /usr/bin/env gcc gives i686-apple-darwin8-gcc-4.0.1 Tried to compile ... didn't work out .. lot's of errors ..
Any tricks left ?
Regards J.
On 18-okt-2006, at 23:57, Jacob Rus wrote:
At this point I don't think there's any reason *not* to just install [Python 2.5][py25] from python.org, and then do the `sudo python setup.py install` routine. There are some nifty new things in python 2.5, and as far as I know, no issues running code for 2.3 or 2.4.
-Jacob
__ For new threads USE THIS: textmate@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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 19. Oct 2006, at 02:08, Jasper van der Meulen wrote:
[...] remove from /Applications/Apps/TextMate.app/Contents/ SharedSupport/Bundles/SQL.tmbundle/Support/bin/
MySQLdb [...]
In the recent versions of TM (cutting edge) we have removed these files so all users will have to install the MySQLdb bindings manually, and it thus won’t eclipse any custom install (the bundled bindings were for PPC only, which is why they gave a problem on Intel systems).
On 19. Oct 2006, at 06:31, Allan Odgaard wrote:
In the recent versions of TM (cutting edge) we have removed these files [...]
ehm… and then I remembered it still works for me w/o ever having installed the MySQLdb files -- we have not removed them yet, we were planning on doing it ;)
I'm wondering if the TODO bundle is somehow broken .. When i make a new file (php) and enter:
<? //TODO testing a bit phpinfo(); ?>
TODO reports : 1: Untitled.php (2) asdlasd
However in my project .. i the complete code behind the TODO
Could it be that a project is different for the TODO ?
Regards J.
I don't think you understand what i mean...
I've got it in a picture now ..
however Regards J.
On 20-okt-2006, at 7:26, Allan Odgaard wrote:
On 20. Oct 2006, at 00:02, Jasper van der Meulen wrote:
Could it be that a project is different for the TODO ?
It visits all files found under TM_PROJECT_DIRECTORY (using the globally configured folder reference patterns for what to skip).
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 20. Oct 2006, at 13:43, Jasper van der Meulen wrote:
I don't think you understand what i mean...
I've got it in a picture now ..
Maybe you have saved the file with CR as line breaks, that would probably explain it.
Try Save As… for the file and see what it says.
It saved it again with: UTF8 CR(mac os classic) and it doens't make a difference then i did a save as with: UTF8 LF and the TODO works now :-)
thanks ..
Regards J.
On 20-okt-2006, at 14:01, Allan Odgaard wrote:
On 20. Oct 2006, at 13:43, Jasper van der Meulen wrote:
I don't think you understand what i mean...
I've got it in a picture now ..
Maybe you have saved the file with CR as line breaks, that would probably explain it.
Try Save As… for the file and see what it says.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate