ModuleNotFoundError with click module
Tim Johnson
tim at akwebsoft.com
Sat Nov 30 14:49:01 EST 2019
Using linux ubuntu 16.04 with bash shell.
Am retired python programmer, but not terribly current.
I have moderate bash experience.
When trying to install pgadmin4 via apt I get the following error traceback
when pgadmin4 is invoked:
Traceback (most recent call last):
File "setup.py", line 17, in <module>
from pgadmin.model import db, User, Version, ServerGroup, Server, \
File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 19, in <module>
from flask import Flask, abort, request, current_app, session, url_for
File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line
21, in <module>
from .app import Flask
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 34,
in <module>
from . import cli
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in
<module>
import click
ModuleNotFoundError: No module named 'click'
If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
>>> import click
click is imported successfully.
In this invocation, sys.path is:
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
'/usr/local/lib/python3.7/lib-dynload',
'/home/tim/.local/lib/python3.7/site-packages',
'/usr/local/lib/python3.7/site-packages']
$PYTHONPATH is empty when the bash shell is invoked
$PATH as follows:
/home/tim/bin:/home/tim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
click.py can be found at
/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/
in turn click.py imports click, presumably as the package,
which appears to be at
/usr/local/lib/python3.7/site-packages/pipenv/vendor/click
Any number of settings of PYTHONPATH to the various paths above has
failed to resolve the ModuleNotFoundError
Same issues with attempting install from a virtual environment.
Any help will be appreciated.
thanks
tim
More information about the Python-list
mailing list