ZMySQL - can't get it to work
Hello, I have just made a fresh install of Zope (vers. 2.3.2) and now I want to add the ZMySQL product. But ... I have installed Distutils ... I have compiled the MySQL-python module ... but I am not sure where to put the _mysql.so module. I have tried to untar the ZMySQL tarball into Zope/lib/python/Products/ZMySQL When I restart the Zope I just get an error: Import error - no module named _mysql Then I tried to copy the _mysql.so module into the ZMySQL dir but then I got the following error: Import error: _mysql.so: undefined symbol PyObject_Init Okay ... what have I missed here? I have followed the readme files. My python version is 2.0 Regards, -- ************************ Gitte Wange Jensen System Squid Developer MMManager Aps +45 29 72 79 72 gitte@mmmanager.org ************************
Python2.0 already has Distutils and MySQL-python pre-builds correctly -- one thing you have to look out is that in the Setup.py file you need to ensure that the line whatever your os is elif os.name == "posix": # most Linux/UNIX platforms include_dirs = ['/usr/local/mysql/include/mysql'] library_dirs = ['/usr/local/mysql/lib/mysql'] Point the include_dirs and library_dirs to the path of your MySQL dirs Then you'll need to untar the ZMySQLDA into your zope directory. Restart zope and hopefully all will be fine;^) To check whether python can connect to MySQL at the python prompt type
import _mysql
or >>import MySQL
if you don't get traceback errors then mysql-python is configured correctly hth Norman ========================================= "Eternity is Time Time, eternity To see the two as opposite Is Man's Perversity" The Book of Angelus Silesius -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Gitte Wange Sent: Monday, May 14, 2001 9:46 AM To: zope@zope.org Subject: [Zope] ZMySQL - can't get it to work Hello, I have just made a fresh install of Zope (vers. 2.3.2) and now I want to add the ZMySQL product. But ... I have installed Distutils ... I have compiled the MySQL-python module ... but I am not sure where to put the _mysql.so module. I have tried to untar the ZMySQL tarball into Zope/lib/python/Products/ZMySQL When I restart the Zope I just get an error: Import error - no module named _mysql Then I tried to copy the _mysql.so module into the ZMySQL dir but then I got the following error: Import error: _mysql.so: undefined symbol PyObject_Init Okay ... what have I missed here? I have followed the readme files. My python version is 2.0 Regards, -- ************************ Gitte Wange Jensen System Squid Developer MMManager Aps +45 29 72 79 72 gitte@mmmanager.org ************************ _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Well no - it didn't work I can compile the mysql.so module - but where shall I put it ? Right now it is in my homedir - but I thought it should be in the ZMySQLDA dir ?? But it doesn't help to put it there either .. Gitte On Monday 14 May 2001 11:27, Norman Khine wrote:
Python2.0 already has Distutils and MySQL-python pre-builds correctly -- one thing you have to look out is that in the Setup.py file you need to ensure that the line whatever your os is
elif os.name == "posix": # most Linux/UNIX platforms include_dirs = ['/usr/local/mysql/include/mysql'] library_dirs = ['/usr/local/mysql/lib/mysql']
Point the include_dirs and library_dirs to the path of your MySQL dirs
Then you'll need to untar the ZMySQLDA into your zope directory.
Restart zope and hopefully all will be fine;^)
To check whether python can connect to MySQL at the python prompt type
import _mysql
or >>import MySQL
if you don't get traceback errors then mysql-python is configured correctly
hth
Norman ========================================= "Eternity is Time Time, eternity To see the two as opposite Is Man's Perversity"
The Book of Angelus Silesius
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Gitte Wange Sent: Monday, May 14, 2001 9:46 AM To: zope@zope.org Subject: [Zope] ZMySQL - can't get it to work
Hello,
I have just made a fresh install of Zope (vers. 2.3.2) and now I want to add the ZMySQL product. But ...
I have installed Distutils ... I have compiled the MySQL-python module ... but I am not sure where to put the _mysql.so module.
I have tried to untar the ZMySQL tarball into Zope/lib/python/Products/ZMySQL When I restart the Zope I just get an error: Import error - no module named _mysql Then I tried to copy the _mysql.so module into the ZMySQL dir but then I got the following error: Import error: _mysql.so: undefined symbol PyObject_Init
Okay ... what have I missed here? I have followed the readme files.
My python version is 2.0
Regards, -- ************************ Gitte Wange Jensen
System Squid Developer MMManager Aps +45 29 72 79 72
gitte@mmmanager.org ************************
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Gitte Wange -
Norman Khine