one step closer to connecting Zope to MySQL
Hi, thanks to all the help I got, I'm a lot closer to connecting Zope to MySQL now and I think I know where the problem is. I have: - started with Suse Linux 7.0 - installed Zope 2.3.2 - installed MySQL 3.22.32 and Python 1.5.2-something with YAST - downloaded and installed MySQL-python-0.3.5, ZMySQLDA-2.0.6 as stated in the ebook I bought myself - downloaded and installed Distutils-1.0.2 - tried to compile the MySQL-python-0.3.5 - got the error message: Traceback (innermost last): File "/usr/zope/lib/python/OFS/Application.py", line 528, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/zope/lib/python/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/zope/lib/python/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/zope/lib/python/Products/ZMySQLDA/db.py", line 89, in ? import _mysql ImportError: No module named _mysql I took a look at /usr/zope/lib/python/Products/ZMySQLDA/db.py and it says in line 89: "import _mysql", hard coded. Which explains the error: I found no such file on my computer. So it seems, I still have to install something, right? What is it? I'll have a beer on you all when it works, promise! Horst _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Hiya, If you have correctly installed the MySQL-python source then this problem will go away. Some setups will put the _mysql module in the python/site-packages/ and if your Zope is from source instead of binary install (with its own python) then it wont find this. Do a find for the _mysql* (dont actually think there is a _mysql like that but other files with an appendation) and then you can try putting with the operative python directories that Zope is using. I think from a binary install of Zope, you can copy it to Zope/bin or Zope/lib/python, something like that. Hope this helps and Good luck, Paz -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Horst Wald Sent: 07 June 2001 13:41 To: zope@zope.org; website-talk-admin@list.ora.com Subject: [Zope] one step closer to connecting Zope to MySQL Hi, thanks to all the help I got, I'm a lot closer to connecting Zope to MySQL now and I think I know where the problem is. I have: - started with Suse Linux 7.0 - installed Zope 2.3.2 - installed MySQL 3.22.32 and Python 1.5.2-something with YAST - downloaded and installed MySQL-python-0.3.5, ZMySQLDA-2.0.6 as stated in the ebook I bought myself - downloaded and installed Distutils-1.0.2 - tried to compile the MySQL-python-0.3.5 - got the error message: Traceback (innermost last): File "/usr/zope/lib/python/OFS/Application.py", line 528, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/zope/lib/python/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/zope/lib/python/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/zope/lib/python/Products/ZMySQLDA/db.py", line 89, in ? import _mysql ImportError: No module named _mysql I took a look at /usr/zope/lib/python/Products/ZMySQLDA/db.py and it says in line 89: "import _mysql", hard coded. Which explains the error: I found no such file on my computer. So it seems, I still have to install something, right? What is it? I'll have a beer on you all when it works, promise! Horst _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _______________________________________________ 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 )
I did an installation more or less like you did. My mysql executable is in /usr/lib/python1.5/site-packages/_mysql.so robert ----- Original Message ----- From: "Horst Wald" <horstwald@hotmail.com> To: <zope@zope.org>; <website-talk-admin@list.ora.com> Sent: Thursday, June 07, 2001 1:41 PM Subject: [Zope] one step closer to connecting Zope to MySQL
Hi,
thanks to all the help I got, I'm a lot closer to connecting Zope to MySQL now and I think I know where the problem is. I have:
- started with Suse Linux 7.0 - installed Zope 2.3.2 - installed MySQL 3.22.32 and Python 1.5.2-something with YAST - downloaded and installed MySQL-python-0.3.5, ZMySQLDA-2.0.6 as stated in the ebook I bought myself - downloaded and installed Distutils-1.0.2 - tried to compile the MySQL-python-0.3.5 - got the error message:
Traceback (innermost last): File "/usr/zope/lib/python/OFS/Application.py", line 528, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/zope/lib/python/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/zope/lib/python/Products/ZMySQLDA/DA.py", line 91, in ? from db import DB File "/usr/zope/lib/python/Products/ZMySQLDA/db.py", line 89, in ? import _mysql ImportError: No module named _mysql
I took a look at /usr/zope/lib/python/Products/ZMySQLDA/db.py and it says in line 89: "import _mysql", hard coded. Which explains the error: I found no such file on my computer. So it seems, I still have to install something, right? What is it?
I'll have a beer on you all when it works, promise!
Horst _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
_______________________________________________ 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 )
Note that there is a binary ZMySQLDA-2.0.7 package which includes MySQLdb-0.9.0 at this location: http://sourceforge.net/projects/mysql-python This may simplify things for you. It is only for Linux (i386) and is linked against MySQL-3.23.38, but I don't think this will cause a problem for you. -- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "I'd rather listen to Newton than to Mundie. He may have been dead for almost three hundred years, but despite that he stinks up the room less." -- Linus T.
participants (4)
-
Andy Dustman -
Horst Wald -
Paul Zwarts -
Robert Rottermann