| Hello, I'm using Ubuntu (new to it), and am really excited about Sage. I can't afford Matlab. I would like to interface Sage/Python with MySql. I've already installed MySql according to this link. I tried the command import MySQLdb, but it didn't work. The output from my terminal is pasted below.
I believe I have the same problem as discussed here However, I'm so new to Ubuntu, that I don't quite follow. I followed the instructions and ran I then received the output pasted below. However, I don't understand how to use this information to update the PYTHONPATH environment variable or the library path. Can anyone help? My basic dilemma is how to use the programming power of python, and the mathematical power of sage together, to analyze data stored in a mysql database. Thanks, William |
| The easiest thing for you may be install MySQL within the SAGE environment. This can be done by downloading the MySQL library for python from http://sourceforge.net/projects/mysql-python/. Then extract it using your favorite GUI tools, or simply: from wherever you download it to. Then you can install it to your SAGE environment with something as simple as: You can then delete all the MySQL-python related files in your downloads directory; they have been installed in your SAGE path. |
| I downloaded http://sourceforge.net/projects/mysql-python/ and extracted the file. I then pasted the MySQL folder inside of my Sage folder. Then in Sage I typed "sudo sage setup.py install", but it didn't work. The terminal gave me the output below. This shows that MySQL-python-1.2.3 is now located in my Sage folder. Then I started Sage and entered "sudo sage setup.py install". The output from this is below. What am I doing wrong? Thanks, William |
Asked: Jan 30 '11
Seen: 413 times
Last updated: Jan 30 '11
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.