-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lookatme cannot find ueberzug when it's installed using pipx (ubuntu 22.04, python3.8) #135
Labels
bug
Something isn't working
Comments
This is really weird. I was able to duplicate this locally too: pipx uninstall lookatme
# to double check - make sure that lookatme's venv isn't present anymore: ls ~/.local/pipx/venvs
# now install lookatme again
pipx install lookatme
# see that there isn't an image_ueberzug.py in the contrib folder:
ls ~/.local/pipx/venvs/lookatme/lib/python*/site-packages/lookatme/contrib
# output> file_loader.py __init__.py __pycache__ terminal.py
# see the expected error manually activating the lookatme pipx venv
(. ~/.local/pipx/venvs/lookatme/bin/activate && python3 -c "import lookatme.contrib.image_ueberzug")
# output> Traceback (most recent call last): │
# output> File "<string>", line 1, in <module> │
# output> ModuleNotFoundError: No module named 'lookatme.contrib.image_ueberzug'
pipx runpip lookatme install lookatme.contrib.image_ueberzug
# this doesn't error anymore!
(. ~/.local/pipx/venvs/lookatme/bin/activate && python3 -c "import lookatme.contrib.image_ueberzug")
# So it SHOULD work with pipx run lookatme ....
pipx run lookatme slideshow_with_image_ueberzug.md # errors
# output> ...
# output> No module named 'lookatme.contrib.image_ueberzug'
# But it DOES work manually activating the environment and running lookatme
(. ~/.local/pipx/venvs/lookatme/bin/activate && lookatme slideshow_with_image_ueberzug.md) As far as I can tell, this isn't something that is lookatme's fault. lookatme is using the normal import system to import the fully-qualified contrib module (code link): module_name = f"lookatme.contrib.{contrib_name}"
try:
mod = __import__(module_name, fromlist=[contrib_name])
except Exception as e:
if ignore_load_failure:
continue
errors.append(str(e)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Apparently when I run lookatme the extension ueberzug cannot be found as it tries to import it from system environment.
To Reproduce
Steps to reproduce the behavior:
pipx install lookatme
pipx runpip lookatme install lookatme.contrib.image_ueberzug
lookatme ./readme.md
readme.md
traceback
Environment (please complete the following information):
lookatme --version
] lookatme, version 2.3.2Additional context
Workaround (this is not what I like to do as I prefer to have all my CLI isolated in differents venvs which is what pipx does).
The text was updated successfully, but these errors were encountered: