I am trying to convert my mailman install (on centos Cpanel server) to use mysql database backend
I followed instructions to install mailman addon python scripts. I get this error in the mailman error log:
ImportError: No module named MySQLdb
I installed mysqldb into directory:
/usr/local/cpanel/
which is listed as root in the cpanel.config file
I reinstalled mailman after the changes... still not working. It looks like a PATH issue. I also checked and saw that cpanel does not put mysql.config in the /usr/local/bin/ directory...
How do I check to see if mysql.config is in my PATH?
Any ides where the install failed? THanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to make sure to figure out where the mailmain installation is looking for modules. It may not be using the same python that you get when running "python" from the command line (esp. if your system has multiple versions of python available).
Look at the top line of one of the mailman programs to find out which python it is running. Then use that python command with something like this:
python -c "import sys; print '\n'.join(sys.path)"
MySQLdb will have to get installed in one of those directories.
Also, you can futz with PYTHONPATH as an environment variable to get programs to look in other places.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to convert my mailman install (on centos Cpanel server) to use mysql database backend
I followed instructions to install mailman addon python scripts. I get this error in the mailman error log:
ImportError: No module named MySQLdb
I installed mysqldb into directory:
/usr/local/cpanel/
which is listed as root in the cpanel.config file
I reinstalled mailman after the changes... still not working. It looks like a PATH issue. I also checked and saw that cpanel does not put mysql.config in the /usr/local/bin/ directory...
How do I check to see if mysql.config is in my PATH?
Any ides where the install failed? THanks
added path to site config file /usr/bin/mysql_config - got these results... tested, and still doesnt work
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.4/MySQLdb
running build_ext
creating build/bdist.linux-i686/egg
copying build/lib.linux-i686-2.4/_mysql.so -> build/bdist.linux-i686/egg
copying build/lib.linux-i686-2.4/_mysql_exceptions.py -> build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/MySQLdb
copying build/lib.linux-i686-2.4/MySQLdb/release.py -> build/bdist.linux-i686/egg/MySQLdb
copying build/lib.linux-i686-2.4/MySQLdb/converters.py -> build/bdist.linux-i686/egg/MySQLdb
copying build/lib.linux-i686-2.4/MySQLdb/times.py -> build/bdist.linux-i686/egg/MySQLdb
copying build/lib.linux-i686-2.4/MySQLdb/cursors.py -> build/bdist.linux-i686/egg/MySQLdb
copying build/lib.linux-i686-2.4/MySQLdb/connections.py -> build/bdist.linux-i686/egg/MySQLdb
creating build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/REFRESH.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/FLAG.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/ER.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/FIELD_TYPE.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/CR.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/CLIENT.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/constants/init.py -> build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/init.py -> build/bdist.linux-i686/egg/MySQLdb
byte-compiling build/bdist.linux-i686/egg/_mysql_exceptions.py to _mysql_exceptions.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/converters.py to converters.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/times.py to times.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/connections.py to connections.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/REFRESH.py to REFRESH.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/FLAG.py to FLAG.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/ER.py to ER.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/CLIENT.py to CLIENT.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/init.py to init.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/init.py to init.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.linux-i686/egg/_mysql.py to _mysql.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
writing MySQL_python.egg-info/native_libs.txt
copying MySQL_python.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying MySQL_python.egg-info/native_libs.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/MySQL_python-1.2.2-py2.4-linux-i686.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing MySQL_python-1.2.2-py2.4-linux-i686.egg
Removing /usr/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg
Copying MySQL_python-1.2.2-py2.4-linux-i686.egg to /usr/lib/python2.4/site-packages
MySQL-python 1.2.2 is already the active version in easy-install.pth
Installed /usr/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg
Processing dependencies for MySQL-python==1.2.2
root@solo [/usr/local/cpanel/MySQL-python-1.2.2]#
You need to make sure to figure out where the mailmain installation is looking for modules. It may not be using the same python that you get when running "python" from the command line (esp. if your system has multiple versions of python available).
Look at the top line of one of the mailman programs to find out which python it is running. Then use that python command with something like this:
python -c "import sys; print '\n'.join(sys.path)"
MySQLdb will have to get installed in one of those directories.
Also, you can futz with PYTHONPATH as an environment variable to get programs to look in other places.