[Zope] WG: Installation of MySQLDatabaseAdabpter : i have the error '
ImportError: No module named _mysql'
Gostnerr
GostnerR@t-systems.com
Thu, 28 Feb 2002 13:25:27 +0100
> Installation of MySQLDatabaseAdabpter : i have the error ' ImportError: No module named _mysql'
>
> Hello,
>
> First of all, I have installed MySQL under /user/local/mysql ( it was the sorce version)
> then under /zopehome I have extract the ZMySQLDA-2.0.9b1.tar.gz ( it extracted to /zopehome/lib/python/Product/ZMySQLDA
> then under /zopehome/lib/python/Product I have extracted MySQL-python-0.9.0.tar.gz
> then i do ' python setup.py build ' ( there was an error message)
> then I edit the setup.py file under ' /zopehome/lib/python/Product/MySQL-python-09' ( because there was this error : mysql.h .. no such file or dirctory )
> a) elif os.name == "posix": #most linux platforms
> include_dirs = ['usr/include/mysql']
> libary_dirs = [' usr/lib/mysql']
> ---------->
> include_dirs = ['usr/local/mysql/include/mysql']
> libary_dirs = [' usr/local/mysql/lib/mysql']
> (because there was the file mysql.h)
>
> after that i do ' python setup.py build ' ( there was no error message)
> and then ' python setup.py install' ( also no error message)
>
> After that all I started the zope server , and i received an Error Message
> Anybody knows why ?? I have no idea !
>
> Roswitha
>
> ------------------------------------------- there is the bash output ----------------------------------------------------------------------
>
>
> linux:/usr/local/ZopePark/Testserver/lib/python/Products/MySQL-python-0.9.0 # python setup.py build
> running build
> running build_py
> not copying CompatMysqldb.py (output up-to-date)
> not copying _mysql_exceptions.py (output up-to-date)
> not copying MySQLdb/__init__.py (output up-to-date)
> not copying MySQLdb/converters.py (output up-to-date)
> not copying MySQLdb/connections.py (output up-to-date)
> not copying MySQLdb/cursors.py (output up-to-date)
> not copying MySQLdb/sets.py (output up-to-date)
> not copying MySQLdb/times.py (output up-to-date)
> not copying MySQLdb/constants/__init__.py (output up-to-date)
> not copying MySQLdb/constants/CR.py (output up-to-date)
> not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
> not copying MySQLdb/constants/ER.py (output up-to-date)
> not copying MySQLdb/constants/FLAG.py (output up-to-date)
> not copying MySQLdb/constants/REFRESH.py (output up-to-date)
> not copying MySQLdb/constants/CLIENT.py (output up-to-date)
> running build_ext
> skipping '_mysql' extension (up-to-date)
> linux:/usr/local/ZopePark/Testserver/lib/python/Products/MySQL-python-0.9.0 # python setup.py install#
> invalid command name 'install#'
> linux:/usr/local/ZopePark/Testserver/lib/python/Products/MySQL-python-0.9.0 # python setup.py install
> running install
> running build
> running build_py
> not copying CompatMysqldb.py (output up-to-date)
> not copying _mysql_exceptions.py (output up-to-date)
> not copying MySQLdb/__init__.py (output up-to-date)
> not copying MySQLdb/converters.py (output up-to-date)
> not copying MySQLdb/connections.py (output up-to-date)
> not copying MySQLdb/cursors.py (output up-to-date)
> not copying MySQLdb/sets.py (output up-to-date)
> not copying MySQLdb/times.py (output up-to-date)
> not copying MySQLdb/constants/__init__.py (output up-to-date)
> not copying MySQLdb/constants/CR.py (output up-to-date)
> not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
> not copying MySQLdb/constants/ER.py (output up-to-date)
> not copying MySQLdb/constants/FLAG.py (output up-to-date)
> not copying MySQLdb/constants/REFRESH.py (output up-to-date)
> not copying MySQLdb/constants/CLIENT.py (output up-to-date)
> running build_ext
> skipping '_mysql' extension (up-to-date)
> running install_lib
> not copying build/lib.linux-i686-2.1/CompatMysqldb.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/_mysql_exceptions.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/__init__.py (output up-to-date)>
> not copying build/lib.linux-i686-2.1/MySQLdb/converters.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/connections.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/cursors.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/sets.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/times.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/__init__.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/CR.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/ER.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/FLAG.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/REFRESH.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/MySQLdb/constants/CLIENT.py (output up-to-date)
> not copying build/lib.linux-i686-2.1/_mysql.so (output up-to-date)
> skipping byte-compilation of /usr/lib/python2.1/site-packages/CompatMysqldb.py to CompatMysqldb.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/_mysql_exceptions.py to _mysql_exceptions.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/__init__.py to __init__.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/converters.py to converters.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/connections.py to connections.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/cursors.py to cursors.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/sets.py to sets.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/times.py to times.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/__init__.py to __init__.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/CR.py to CR.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/ER.py to ER.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/FLAG.py to FLAG.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/REFRESH.py to REFRESH.pyc
> skipping byte-compilation of /usr/lib/python2.1/site-packages/MySQLdb/constants/CLIENT.py to CLIENT.pyc
> linux:/usr/local/ZopePark/Testserver/lib/python/Products/MySQL-python-0.9.0 # cd ..
> linux:/usr/local/ZopePark/Testserver/lib/python/Products # cd ..
> linux:/usr/local/ZopePark/Testserver/lib/python # cd ..
> linux:/usr/local/ZopePark/Testserver/lib # cd ..
> linux:/usr/local/ZopePark/Testserver # ./start &
> [1] 1239
> linux:/usr/local/ZopePark/Testserver # ------
> 2002-02-26T09:20:11 ERROR(200) Zope Could not import Products.ZMySQLDA
> Traceback (innermost last):
> File /usr/local/ZopePark/Testserver/lib/python/OFS/Application.py, line 563, in import_product
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ?
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/DA.py, line 92, in ?
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/db.py, line 89, in ?
> ImportError: No module named _mysql
>
>
> ------
> 2002-02-26T09:20:11 PANIC(300) z2 Startup exception
> Traceback (innermost last):
> File /usr/local/ZopePark/Testserver/z2.py, line 564, in ?
> File <string>, line 1, in ?
> File /usr/local/ZopePark/Testserver/lib/python/Zope/__init__.py, line 110, in ?
> File /usr/local/ZopePark/Testserver/lib/python/ZODB/FileStorage.py, line 267, in __init__
> File /usr/local/ZopePark/Testserver/lib/python/ZODB/lock_file.py, line 101, in lock_file>
> StorageSystemError: Could not lock the database file. There must be
> anoth> er process that has opened the file.
> <p>
>
>
>
> [1]+ Done ./start
> linux:/usr/local/ZopePark/Testserver # ./stop
> linux:/usr/local/ZopePark/Testserver # ./start
> ------
> 2002-02-26T09:21:45 ERROR(200) Zope Could not import Products.ZMySQLDA
> Traceback (innermost last):
> File /usr/local/ZopePark/Testserver/lib/python/OFS/Application.py, line 563, in import_product
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ?
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/DA.py, line 92, in ?
> File /usr/local/ZopePark/Testserver/lib/python/Products/ZMySQLDA/db.py, line 89, in ?
> ImportError: No module named _mysql
>
>
> ------
> 2002-02-26T09:21:47 INFO(0) ZServer HTTP server started at Tue Feb 26 10:21:47 2002
> Hostname: localhost
> Port: 8080
> ------
> 2002-02-26T09:21:47 INFO(0) ZServer FTP server started at Tue Feb 26 10:21:47 2002
> Hostname: linux
> Port: 8021
> ------
> 2002-02-26T09:21:47 INFO(0) ZServer PCGI Server started at Tue Feb 26 10:21:47 2002
> Unix socket: /usr/local/ZopePark/Testserver/var/pcgi.soc
>
>
>
>