Kevin Adler responded on Ryver (where I cross posted) and had me:

"pip3 install future"

That fixed the issue. Apparently there was an update to ibm_db_sa where the
future module is needed, however the script had not be updated to
include it.

Jim Oberholtzer
Agile Technology Architects

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Evan Harris
Sent: Tuesday, September 25, 2018 4:18 PM
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] sqlalchemy on IBM i.

Hi Jim

sure looks to me like it's the import; it seems interesting to me that it
can't find module "future" rather than "future.utils" - almost like the name
resolution is a problem.

I see you have "from ." in your other import statements so it seems there is
some relationship to path in the import statements that I have not struck in
my python scripts yet (all on windows)

On Wed, Sep 26, 2018 at 5:27 AM Jim Oberholtzer

IBM i V7R2 (most recent groups/cumulative) : sqlalchemy version

I'm trying to get an sqlalchemy test to work and it stops with the

bash-4.4$ python3.6
Traceback (most recent call last):
File "", line 3, in <module> import ibm_db_sa.ibm_db_sa
File "/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/",
line 22, in <module> from . import ibm_db, pyodbc, base, zxjdbc File
"/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/", line
20, in <module> from .base import DB2ExecutionContext, DB2Dialect File
"/QOpenSys/pkgs/lib/python3.6/site-packages/ibm_db_sa/", line
30, in <module> from . import reflection as ibm_reflection File
line 26, in <module>
from future.utils import iteritems
ModuleNotFoundError: No module named 'future'

If I am readying this right, the module "future.utils" is part of the
sqalchemy package. The code calling it is:

import sqlalchemy
from sqlalchemy import *
import ibm_db_sa.ibm_db_sa
db2 =
metadata = MetaData()
users = Table('users', metadata,
Column('user_id', Integer, primary_key = True), Column('user_name',
String(16), nullable = False), Column('email_address', String(60),
key='email'), Column('password', String(20), nullable = False)
metadata.bind = db2
users_table = Table('users', metadata, autoload=True,
autoload_with=db2) users_table

I think it's the import* that's causing the issue.

This is just a see if it can connect script and I lifted it from the
IBM page on sqlalchemy (which of course has no reference to IBM i)


Jim Oberholtzer

Agile Technology Architects

This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2021 by 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.