Hi All,

I am just a month old with Python and trying to learn CGI with Python. I
was trying to install MySQLdb module in my new CentOS 5.3 box with
Python 2.4.3 default install. I downloaded the tar-ball of MySQLdb
module (MySQL-python-1.2.3c1). Did build as normal user and install as
root. MySQL server version that I'm using is 5.1.41, if that has
anything to do with the error. I then copied, libmysqlclient_r.so.16
library to /usr/lib/ folder and then I am able to import the module as
root user. But cannot do this as normal user.

Now, while doing import MySQLdb as normal user, I get the following
error message. The scripts will be run as apache and hence cannot have
this error. Please check the following output. Also I have attached the
output while doing build and install process.

[kuria...@server MySQL-python-1.2.3c1]$ python
Python 2.4.3 (#1, Jan 21 2009, 01:10:13) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg/_mysql.py:3:
 UserWarning: Module _mysql was already imported from 
/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg/_mysql.pyc,
 but /opt/downloads/py-modules/MySQL-python-1.2.3c1 is being added to sys.path

It would be a great help if I understand what's going on!!! Thanks in
advance.

Regards,

Kurian Mathew Thayil.
[kuria...@server MySQL-python-1.2.3c1]$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.4
copying _mysql_exceptions.py -> build/lib.linux-i686-2.4
creating build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-i686-2.4/MySQLdb
creating build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> 
build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> 
build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> 
build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> 
build/lib.linux-i686-2.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-i686-2.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC 
-Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 
-I/usr/local/include/mysql -I/usr/include/python2.4 -c _mysql.c -o 
build/temp.linux-i686-2.4/_mysql.o -DUNIV_LINUX -DUNIV_LINUX
In file included from _mysql.c:36:
/usr/local/include/mysql/my_config.h:1050:1: warning: "HAVE_WCSCOLL" redefined
In file included from /usr/include/python2.4/pyconfig.h:4,
                 from /usr/include/python2.4/Python.h:8,
                 from pymemcompat.h:10,
                 from _mysql.c:29:
/usr/include/python2.4/pyconfig-32.h:648:1: warning: this is the location of 
the previous definition
gcc -pthread -shared build/temp.linux-i686-2.4/_mysql.o -L/usr/local/lib/mysql 
-lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -o 
build/lib.linux-i686-2.4/_mysql.so
[r...@server MySQL-python-1.2.3c1]# python setup.py install
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
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/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/CR.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/constants/REFRESH.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/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/CLIENT.py -> 
build/bdist.linux-i686/egg/MySQLdb/constants
copying build/lib.linux-i686-2.4/MySQLdb/__init__.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/release.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/converters.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/connections.py to 
connections.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/__init__.py to 
__init__.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/constants/REFRESH.py to 
REFRESH.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/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/CLIENT.py to 
CLIENT.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/times.py to times.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.linux-i686/egg/MySQLdb/converters.py to 
converters.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
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/top_level.txt -> 
build/bdist.linux-i686/egg/EGG-INFO
writing build/bdist.linux-i686/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/MySQL_python-1.2.3c1-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.3c1-py2.4-linux-i686.egg
Removing 
/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg
Copying MySQL_python-1.2.3c1-py2.4-linux-i686.egg to 
/usr/lib/python2.4/site-packages
MySQL-python 1.2.3c1 is already the active version in easy-install.pth

Installed 
/usr/lib/python2.4/site-packages/MySQL_python-1.2.3c1-py2.4-linux-i686.egg
Processing dependencies for MySQL-python==1.2.3c1
Finished processing dependencies for MySQL-python==1.2.3c1

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to