You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that I needed to additionally install pygobject and pango from conda-forge to get the install working, otherwise the program would try to load libraries which weren't there.
Error logs
Before installing pygobject:
❯ presenterm-export --version slides impure 15:51:47
-----
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
-----
Traceback (most recent call last):
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/bin/presenterm-export", line 5, in <module>
from presenterm_export.cli import main
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/presenterm_export/cli.py", line 14, in <module>
from presenterm_export.pdf import PdfOptions, generate_pdf
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/presenterm_export/pdf.py", line 3, in <module>
import weasyprint
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/__init__.py", line 419, in <module>
from .css import preprocess_stylesheet # noqa: I001, E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/css/__init__.py", line 28, in <module>
from .computed_values import COMPUTER_FUNCTIONS
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/css/computed_values.py", line 9, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 431, in <module>
gobject = _dlopen(
^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 420, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'gobject-2.0-0': gobject-2.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
Before installing pango:
❯ presenterm-export --version 14s slides impure 15:55:19
-----
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
-----
Traceback (most recent call last):
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/bin/presenterm-export", line 5, in <module>
from presenterm_export.cli import main
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/presenterm_export/cli.py", line 14, in <module>
from presenterm_export.pdf import PdfOptions, generate_pdf
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/presenterm_export/pdf.py", line 3, in <module>
import weasyprint
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/__init__.py", line 419, in <module>
from .css import preprocess_stylesheet # noqa: I001, E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/css/__init__.py", line 28, in <module>
from .computed_values import COMPUTER_FUNCTIONS
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/css/computed_values.py", line 9, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 434, in <module>
pango = _dlopen(
^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/weasyprint/text/ffi.py", line 420, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jacan/Documents/code/python/.micromamba/envs/slides/lib/python3.12/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'pango-1.0-0': pango-1.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0-0'
It now works, and I have a minimal environment.yml file with contents:
Sorry I never replied here! I think this is not presenterm-export's fault but instead weasyprint's. They should be specifying those dependencies, not every consumer of their library. Weirdly, I can install presenterm-export in a clean virtual env and I see none of those 2 dependencies installed and the tool works fine for me 🤷.
Hi there! Very cool work with this tool, I think I'll make a lot of use out of it!
I just wanted to say, for the export functionality, the statement in the docs
Is not quite right. I installed it fresh on my system using micromamba.
My system specs
I found that I needed to additionally install
pygobject
andpango
fromconda-forge
to get the install working, otherwise the program would try to load libraries which weren't there.Error logs
Before installing
pygobject
:Before installing
pango
:It now works, and I have a minimal
environment.yml
file with contents:But you may want to consider updating your documentation, or the automatically installed dependencies.
Thanks for your great work on this project!
The text was updated successfully, but these errors were encountered: