|
From: Jim Steil <jim@xxxxxxxxxxxxxxx>get_similar_commands
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 06/24/2016 05:10 PM
Subject: Re: [IBMiOSS] ibm_db and itoolkit for Python
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
Here is that I get after copying the file:
[qsecofr@QLFI2]/home/jsteil/dev/flask_test# pip3 install flask
Traceback (most recent call last):
File "/QOpenSys/usr/bin/pip3", line 7, in <module>
from pip import main
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/__init__.py",
line 13, in <module>
from pip.commands import commands, get_summaries,
FileInstallationError
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/commands/__init__.py",
line 6, in <module>
from pip.commands.bundle import BundleCommand
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/commands/bundle.py",
line 6, in <module>
from pip.commands.install import InstallCommand
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/commands/install.py",
line 5, in <module>
from pip.req import InstallRequirement, RequirementSet,
parse_requirements
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/req/__init__.py",
line 3, in <module>
from .req_install import InstallRequirement
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/req/req_install.py",
line 42, in <module>
from pip.utils.hashes import Hashes
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
pip/utils/hashes.py",
line 5, in <module>
from pip.exceptions import HashMismatch, HashMissing,
ImportError: cannot import name 'HashMissing'version of
-Jim
On Fri, Jun 24, 2016 at 5:05 PM, Kevin Adler <kadler@xxxxxxxxxx> wrote:
Looks like you've upgraded pip (since the traceback is pointing to
site-packages instead of vendor-packages). pip includes its own
/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/six.pysix here:pip/_vendor/six.py
/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
Make sure this shows 1.10.0:
python3 -c 'import pip._vendor.six as six; print(six.__version__)'
If not, you might want to copy
(intopip/_vendor/six.py
/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/
and see if that fixes your problem. If so, I'd recommend upgrading pip
/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/six.pycase there's other problems).
"OpenSource" <opensource-bounces@xxxxxxxxxxxx> wrote on 06/23/2016
02:29:09 PM:
From: Jim Steil <jim@xxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 06/23/2016 02:29 PM
Subject: Re: [IBMiOSS] ibm_db and itoolkit for Python
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
[qsecofr@QLFI2]/QOpenSys/QIBM/ProdData/OPS# python3 -c 'import six;
print(six.__version__); print(six.__file__);'
1.10.0
same
...and, pip3 is broken now. It doesn't work for me, getting the
Ryver?error
as when I tried to pip3 install ibm_db
Bill - Any way to grab this whole conversation and bring it in to
arewrote:
-Jim
On Thu, Jun 23, 2016 at 1:21 PM, Bill Gravelle <starbg@xxxxxxxxxxx>
Sorry to interrupt - I know this is very complicated stuff y’all
beenworking out here …
Since you’re both on the new community collaboration/communication
platform over on Ryver (and everyone else here in this list has
efficientinvited), might this kind of interactive(ish) Q&A be more
wrote:and
effective within that interface?
On Jun 23, 2016, at 12:12 PM, Kevin Adler <kadler@xxxxxxxxxx>
it
Do you have an older version of six installed?
If you've gotten to a recent PTF level of the Python 3 runtime
06/23/2016will be
print(six.__file__);'included by default.
What is the output of the following commands?
pip3 list | grep six
python3 -c 'import six; print(six.__version__);
"OpenSource" <opensource-bounces@xxxxxxxxxxxx> wrote on
pip312:56:35 PM:
From: Jim Steil <jim@xxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 06/23/2016 12:56 PM
Subject: Re: [IBMiOSS] ibm_db and itoolkit for Python
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
I received the following trying ti pip3 install it:
[qsecofr@QLFI2]/QOpenSys/QIBM/ProdData/OPS/Python-pkgs/ibm_db#
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/install
ibm_db-2.0.5.4-cp34-cp34m-os400_powerpc.whl
Traceback (most recent call last):
File "/QOpenSys/usr/bin/pip3", line 7, in <module>
from pip import main
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/__init__.py",get_similar_commands
line 13, in <module>
from pip.commands import commands, get_summaries,
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/commands/__init__.py",
line 6, in <module>
from pip.commands.bundle import BundleCommand
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/commands/bundle.py",
line 6, in <module>
from pip.commands.install import InstallCommand
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/commands/install.py",
line 5, in <module>
from pip.req import InstallRequirement, RequirementSet,
parse_requirements
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/req/__init__.py",
line 3, in <module>
from .req_install import InstallRequirement
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/req/req_install.py",
line 35, in <module>
from pip.utils import (
File
"/QOpenSys/QIBM/ProdData/OPS/Python3.4/lib/python3.4/site-packages/pip/utils/__init__.py",
line 100, in <module>
def rmtree(dir, ignore_errors=False):
File
<kadler@xxxxxxxxxx>pip/_vendor/retrying.py",
line 47, in wrap
@six.wraps(f)
AttributeError: 'module' object has no attribute 'wraps'
[qsecofr@QLFI2]/QOpenSys/QIBM/ProdData/OPS/Python-pkgs/ibm_db#
-Jim
On Thu, Jun 23, 2016 at 12:31 PM, Kevin Adler
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/SI60563wrote:
Oops, sorry gave you the wrong PTF number. Here's the Py3 PTF:
All the Python PTFs are documented here:
06/23/2016wiki/IBM%20i%20Technology%20Updates/page/Python%20PTFs
"OpenSource" <opensource-bounces@xxxxxxxxxxxx> wrote on
added09:26:58 AM:
From: Jim Steil <jim@xxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 06/23/2016 09:27 AM
Subject: Re: [IBMiOSS] ibm_db and itoolkit for Python
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
I did not have SI60567 install. I've installed it now. It
onlya
.whl
file to /QOpenSys/QIBM/ProdData/OPS/Python-pkgs/ibm_db, but
whichone
for
Python 2.7:
ibm_db-2.0.5.4-cp27-cp27m-os400_powerpc.whl
There is also an egg file, but that is for ibm_db v2.0.5.1
ibm_db vI
think
is
what I already had installed. Is there a .whl file for
<kadler@xxxxxxxxxx>2.0.5.4
for Python 3?
-Jim
On Wed, Jun 22, 2016 at 10:29 PM, Kevin Adler
Here'stheywrote:
connect/pconnect take implementation specific parameters, so
aren't
in the PEP. We should probably document them somewhere.
database='',the
database='',function definitions from the ibm_db_dbi.py:
def connect(dsn=None, user='', password='', host='',
conn_options=None):
def pconnect(dsn, user='', password='', host='',
specifyconn_options=None):
(Note, host is not supported on IBM i, since you have to
do:this
defaultin
password=None)the RDB)
try this:
import ibm_db_dbi as dbi
conn = dbi.pconnect(dsn=None, database='*LOCAL', user=None,
You can specify a DSN string like so:
dbi.pconnect("DATABASE=*LOCAL;UID=user;PWD=pass")
and this should be equivalent as above *LOCAL/None/None:
dbi.pconnect("DATABASE=*LOCAL")
Now that I'm looking at it again, it looks like I missed the
parameter for dsn on pconnect. Once that's there, you can
sure
dbi.pconnect(database='*LOCAL', user=None, password=None)
(Already works on connect)
Make sure you're on the latest version of ibm_db. I'm not
Sinceif
the
original shipped version of ibm_db_dbi actually worked.
out06/22/20162.0.5.1
SI60567.it
should work, but I'd get to 2.0.5.4, which is shipped with
"OpenSource" <opensource-bounces@xxxxxxxxxxxx> wrote on
parameters.09:33:07 PM:
From: Jim Steil <jim@xxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 06/22/2016 09:34 PM
Subject: Re: [IBMiOSS] ibm_db and itoolkit for Python
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
I'm trying ibm_db_dbi but can't figure out the pconnect
<gallium.arsenide@xxxxxxxxx>Trying
to connect to the local database. Any pointers?
Jim
On Jun 22, 2016 8:25 PM, "John Yeung"
<jim@xxxxxxxxxxxxxxx>wrote:
On Wed, Jun 22, 2016 at 5:54 PM, Jim Steil
wrote:
Hey John - where can I get some info on ibm_db? I tried
hadthe
itoolkit
on my IBM i today and was a bit disappointed in what I
infoto do
to
preferredaccess
the database. I'm guessing this is not going to be the
method
of
db access for Python. I'd appreciate pointers to any
notyou
have
on
ibm_db for Python...
I agree with Kevin: Under normal circumstances, you should
you're abe
standardusing ibm_db directly, but rather ibm_db_dbi, to get the
Python database interface as laid out in PEP 249. If
withlong-time Python user, you're probably already familiar
documentationthis
interface. If not, I find the PEP is pretty good
http://yips.idevcloud.com/wiki/index.php/XMLSERVICE/Pythonfor
hopesit.
To be completely honest, I have never had especially high
for
itoolkit, whether for accessing data or programs:
otheraround
The documentation for the underlying XMLSERVICE has been
for
quite some time now, as well as some of its wrappers in
cumbersome,languages. It just seems fundamentally verbose and
Itby
documentationPython standards. The Python version (judging by the
linked to above) is about as verbose as I was expecting.
Ruby.looks
almost as bulky as Java, but with a style reminiscent of
we'llOr
thosemaybe JavaScript. (I only have a passing familiarity with
languages.) But I haven't given it a fair shake yet, so
thesee.
If I do become a convert to IBM's Python (as opposed to
upthird-party iSeriesPython which I'm using now), I may wind
programswriting
my own wrapper for itoolkit, or my own fork of itoolkit.
To me, itoolkit seems to be mainly for calling native
inand
service programs (mostly written by your own shop, mostly
IBMRPG),
niches,or
IBM system APIs. Both of these uses are probably dwindling
as
more and more people write stored procedures and UDFs, and
beexposes
more and more system services to SQL. Eventually, you may
farable
to
just do everything with ibm_db_dbi. But I know our shop is
mailingfrom
that point.
John Y.
--
This is the IBMi Open Source Roundtable (OpenSource)
http://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
archivesor email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
mailingat http://archive.midrange.com/opensource.--
This is the IBMi Open Source Roundtable (OpenSource)
http://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
listlistor email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing
To post a message email: OpenSource@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing
listTo post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing
listTo post a message email: OpenSource@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing
listTo post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing
----To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.
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.