× 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, Jan 17, 2022 at 5:00 PM Jack Tucky <jacktucky@xxxxxxxxx> wrote:

Note that the directory /QOpenSys/pkgs/lib/python3.6/site-packages/openpyxl
is there but I can't find any openpyxl module.

I'm not sure what you mean by "can't find any openpyxl module" but my
guess is that you are looking for a file called `openpyxl.py` and not
finding it.

There isn't one. But openpyxl is indeed installed. The `__init__.py`
in the `openpyxl` directory makes that directory a "package" in Python
terminology.

From within Python, there isn't much meaningful difference between
"module" and "package". Either way, you use `import` as usual. The
true test of whether you can "find" some module or package is to try
importing it.

Now, if what you mean is that you are unable to import `openpyxl`,
then the most likely explanation is that you are using a different
Python than the one for which openpyxl is installed.

[33mWARNING: Running pip as root will break packages and permissions. You
should install packages reliably by using venv: https:
//pip.pypa.io/warnings/venv [0m

I have two things to say about that warning. First, it's just a
warning. There may not be any hard failure. Usually, if you get a
warning while trying to install something with pip, the installation
still worked. As I said before, the true test is going into Python and
trying to import the thing you just tried to install.

The second thing is: Apparently, you're logged in as root, which
deserves a warning unto itself, apart from any issues with pip.

You should treat the root user more-or-less like you would treat
QSECOFR. You wouldn't log in as QSECOFR just to do RPG programming,
right?

So, while Jack Woehr's recommendation is a good one, I think the first
thing you should do is log in with a "normal" user profile (create one
if you don't already have one). And then if you want to dive into
virtual environments, even before trying to program anything in
Python, by all means do that; but in my opinion working with venvs can
wait.

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.