cdump / investments

Analysis of Interactive Brokers reports for tax reporting in Russia
MIT License
111 stars 20 forks source link

Установка через pip на macos: не находит pango #67

Open monitorius opened 1 year ago

monitorius commented 1 year ago

Привет! Пока не поставил pango руками - не запускалось при установке через pip.

brew install pango

Мб стоит добавить в доку?

Падало так:

python -m investments.ibtax --activity-reports-dir data/activity --confirmation-reports-dir data/trade_confirmation

-----

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 "/opt/homebrew/Cellar/python@3.10/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/homebrew/Cellar/python@3.10/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/homebrew/lib/python3.10/site-packages/investments/ibtax/__main__.py", line 1, in <module>
    from investments.ibtax.ibtax import main
  File "/opt/homebrew/lib/python3.10/site-packages/investments/ibtax/ibtax.py", line 14, in <module>
    from investments.ibtax.report_presenter import NativeReportPresenter, ReportPresenter  # noqa: I001
  File "/opt/homebrew/lib/python3.10/site-packages/investments/ibtax/report_presenter.py", line 7, in <module>
    from weasyprint import CSS, HTML  # type: ignore
  File "/opt/homebrew/lib/python3.10/site-packages/weasyprint/__init__.py", line 341, in <module>
    from .css import preprocess_stylesheet  # noqa isort:skip
  File "/opt/homebrew/lib/python3.10/site-packages/weasyprint/css/__init__.py", line 25, in <module>
    from . import computed_values, counters, media_queries
  File "/opt/homebrew/lib/python3.10/site-packages/weasyprint/css/computed_values.py", line 11, in <module>
    from ..text.ffi import ffi, pango, units_to_double
  File "/opt/homebrew/lib/python3.10/site-packages/weasyprint/text/ffi.py", line 431, in <module>
    pango = _dlopen(
  File "/opt/homebrew/lib/python3.10/site-packages/weasyprint/text/ffi.py", line 417, in _dlopen
    return ffi.dlopen(names[0])  # pragma: no cover
  File "/opt/homebrew/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/opt/homebrew/lib/python3.10/site-packages/cffi/api.py", line 832, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "/opt/homebrew/lib/python3.10/site-packages/cffi/api.py", line 827, in _load_backend_lib
    raise OSError(msg)
OSError: cannot load library 'pango-1.0-0': dlopen(pango-1.0-0, 0x0002): tried: '/opt/homebrew/lib/pango-1.0-0' (no such file), 'pango-1.0-0' (no such file), '/usr/local/lib/pango-1.0-0' (no such file), '/usr/lib/pango-1.0-0' (no such file), '/Users/monitorius/Yandex.Disk.localized/code/finance/nalog/pango-1.0-0' (no such file).  Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0-0'