I am trying to install mysqldb-python onto a centos vps server via ssh terminal. Heres what im doing:


easy_install mysql-python

Now when i run python from terminal:
Last login: Thu Dec 6 14:23:54 2012 from -----------
[root@fkn ~]# python2.7
Python 2.7.2 (default, Oct 30 2012, 15:05:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named MySQLdb
>>>


What I think the problem may be:

When I run "python scriptname.py" python 2.4 loads by default , So I use "python2.7 scriptname.py" the package manager in plesk does not allow me to uninstall the default python as Centos uses it.


So I tried the above test with just the standard python installation:

[root@fkn ~]# python
Python 2.4.3 (#1, Jun 18 2012, 08:55:23)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>


This works! So my easyinstall is installing the script for the wrong python is there any easy solution to this?