Learning why module will not load

Barry barry at barrys-emacs.org
Tue Dec 29 16:50:21 EST 2020



> On 29 Dec 2020, at 18:14, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> 
> Running Slackware-14.2/x86_64 and python-3.9.1. Installed are
> six-1.14.0-x86_64-1_SBo and python3-six-1.13.0-x86_64-1_SBo (I don't know if
> the latter is required because six is supposed to be available for python2
> and python3.)
> 
> However, python3 doesn't find either one:
> 
> $ python3
> Python 3.9.1 (default, Dec 26 2020, 11:21:00) [GCC 5.5.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import six
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'six'
>>>> import python3_six
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'python3_six'
> 
> How do I diagnose why neither module is found?

I do this to to debug odd import issues:

$ python3.9 -v
...
>>> import six

The output will show the attempts python makes to find the six module.

Barry

> 
> TIA,
> 
> Rich
> 
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 



More information about the Python-list mailing list