[Zope] ZMySQLDA Help

Dennis Allison allison@sumeru.stanford.EDU
Tue, 9 Jul 2002 15:16:42 -0700


OK, which zope and which python are you using?  Zope requires python
2.1.3.  RH7.3 ships with Python 1.5 and Python 2.2.    The Linux binary
distribution of Zope includes python 2.1.3--it's what I use.

You'll need the source tarballs or the SRPMs for MySQL-python-0.9.1-1py2.
Both MySQL-python and ZMySQLDA use distutils.  In the directory for each 
product execute

	/var/www/zope/bin/python setup.py build
	/var/www/zope/bin/python setup.py install

Note that you *must* use the python used with zope as that's the way all
the proper libraries and path are identified.  After a bit of fuss, some 
C compiles, and the like, you should be in business.

Good luck.

	-d

-----

> I've just rebuilt my system RedHat 7.3 with zope I used the following to
> still get the below errors anything to help?
> 
> files used:
> - MySQL-python-0.9.1-1py1.i386.rpm
> - MySQL-python-0.9.1-1py2.i386.rpm
> - ZMySQLDA-2.0.8.tar.gz
> 
> error:
> 2002-07-09T20:27:15 ERROR(200) Zope Could not import Products.ZMySQLDA
> Traceback (innermost last):
>   File /var/www/zope/lib/python/OFS/Application.py, line 531, in
> import_product
>   File /var/www/zope/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ?
>   File /var/www/zope/lib/python/Products/ZMySQLDA/DA.py, line 92, in ?
>   File /var/www/zope/lib/python/Products/ZMySQLDA/db.py, line 89, in ?
> ImportError: No module named _mysql
> 
> Thanks,
> Todd
> 
> From: Dennis Allison [mailto:allison@sumeru.stanford.EDU]
> 
> Install gcc?
> 
> What system are you running on?  You need to install two things -- the
> python adaptor for MySQL and the zope adaptor.  In a linux environment
> I just followed the instructions at Zope.org and everything came up
> neatly.  With other environments, YMMV.
> 
> I use MySQL-python-0.9.1.  and ZMySQLDA-2.0.8 both distributed as tarballs.
> You do have to compile some C code--hence the need for gcc.  Look at the
> setup.py
> programs to set configuration stuff.
> 
> >I just tried and I still can't seem to get it to work it gives me the
> following
> >message when I run python2.1 setup.py build:
> >
> >error: command 'gcc' failed with exit status 1
> >
> >Anything else I need to do?
> >
> >Quoting Dennis Allison <allison@sumeru.stanford.EDU>:
> >
> >> You need to install it in the Zope version of python.  Run setup in the
> >> ZMySQLDA
> >> directory with the version of python you are using for Zope.
> >>