Context: I am working on some Python scripts on an Ubuntu server. I need to use code written in Python 2.7, but our server has Python 2.5. We installed 2.7 as the second instance of Python, so that we don't break anything that depends on 2.5. Now I need to install the MySQLdb package. I assume that I cannot do this in a simple way by running apt-get install python-mysqldbbecause it will most likely just reinstall on python 2.5, so I am just trying to install it manually.
Problem: in the MySQL-python-1.2.3 directory, I'm trying to start python2.7 setup.py buildand get an error message:
sh: /etc/mysql/my.cnf: denied denied
along with Traceback, which says setup.py could not find the file.
Note that the setup.py script by default looks for the file mysql_configin the $ PATH directories, but the mysql configuration file for our server /etc/mysql/my.cnf, so I changed the package file site.cfgto match. I checked the permissions for the file, which are -rw-rr--. I tried to run the script as root and got the same error.
Any suggestions?
source
share