× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So the sqlite route was what I tried when I couldn't get MySQL to work and I actually DID install sqlite from Perzl:

bash-4.2$ sqlite3
SQLite version 3.7.16.2 2013-04-12 11:52:43

However, it doesn't correct the error when I try to start up the app:

import sqlite3
File "/QOpenSys/QIBM/ProdData/OPS/Python2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/QOpenSys/QIBM/ProdData/OPS/Python2.7/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3

It is looking for the module _sqlite3 which, based on the research I did on the error is *supposed* to live here:

Z:\QOpenSys\QIBM\ProdData\OPS\Python2.7\lib\python2.7\lib-dynload

as _sqlite.so

Not sure if I can copy that shared object from someplace but that seems to be what the import statement is choking on....


Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

On 12/27/2016 12:42 PM, Kevin Adler wrote:
Ok, still haven't gotten lunch yet, but I think I know the problem. When I
run pip install, it complained about missing mysql_config so I added
/usr/local/mysql/bin to the path and I could find mysql_config. Running
that, I see it outputs a bunch of stuff:

Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -g -q64 -ma -qstrict
-qoptimize=2 -qmaxmem=8192 -qalign=natural -qldbl128 -DUNIV_AIX
-DUNIV_AIX]
--include [-I/usr/local/mysql/include]
--libs [-Wl,-brtl -L/usr/local/mysql/lib/mysql
-lmysqlclient -lz -lnsl_r -lm]
--libs_r [-Wl,-brtl -L/usr/local/mysql/lib/mysql
-lmysqlclient_r -lz -lnsl_r -lm]
--plugindir [/usr/local/mysql/lib/mysql/plugin]
--socket [/tmp/mysql.sock]
--port [0]
--version [5.1.59]
--libmysqld-libs [-Wl,-brtl -L/usr/local/mysql/lib/mysql -lmysqld
-ldl -lz -lnsl_r -lm -lrt]


It looks like the MySQL-python is using that output to detect the CFLAGS
to use when building itself. Since the MySQL connector was built with XLC
and also 64-bit (at least for the random version I have installed on this
box), it has -q64 in the CFLAGS.

Looks like the MySQL DB2 connector is mutually incompatible with the
Python we ship with OPS. You could try downloading the tar file and using
the /opt/freeware/bin/python_64 like so:

/opt/freeware/bin/python_64 setup.py build
/opt/freeware/bin/python_64 setup.py install

Of course, you'll need XLC for that unfortunately.


If you can deal with sqlite, you can use pysqlite at least. The sqlite
package that comes with Python was built against the Perzl sqlite (by
accident). If you install the Perzl sqlite it should work. (We're working
to fix this properly).


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.