× 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.



On Mon, Jun 20, 2016 at 1:53 PM, Aaron Bartell <aaronbartell@xxxxxxxxx> wrote:
*>(A huge step would be to install ibm_db and itoolkit.)*

Both should be installed on Litmis Spaces. Run the following command to
see: ls -all /QOpenSys/QIBM/ProdData/OPS/Python-pkgs

I think you meant either -al or -alF, rather than -all (each letter is
its own switch; there's no advantage to repeating a switch).

I was expecting those packages to be installed in Litmis Spaces
already, and indeed they do show up in the directory you've shown. But
I had no idea that was where they were until you told me. Anyone
familiar with Python will be looking for a directory called
site-packages[1].

I guess for now the simplest way to import them is to manually add the
necessary directory to the search path from within Python:

import sys
sys.path.append('/QOpenSys/QIBM/ProdData/OPS/Python-pkgs')
import ibm_db

But really, this is something that should be fixed.

[1]Python comes with a module called site. It has functions that
affect how the interpreter searches for packages to import. You can
see where Python is expecting to find installed packages as follows
(from the Python prompt):

import site
site.getsitepackages()

If those directories don't exist, they don't make it into sys.path.

I think something probably has to be done about the directory
structure anyway, because you absolutely have to have different
site-packages for different versions of Python. Sure, a Litmis space
can probably be configured to only have one version of Python, but
that seems like an artificial limitation.

Also, we can expect some extra effort in these initial stages of adopting
open source on IBM i**. The key is ~documenting~ our progress so the next
person doesn't have to go through the same hoops. Documenting can happen
in many locations (stackoverflow.com, github gists, blogs, wikis, etc).
Also, feel free to make a new Python page at the following link to document
resolutions: https://bitbucket.org/ibmi/opensource/wiki/Home

Totally agree. I will see what I can do, though I can't promise
anything as my time is even more limited than usual.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.