vega / vegafusion

Serverside scaling for Vega and Altair visualizations
https://vegafusion.io
BSD 3-Clause "New" or "Revised" License
317 stars 17 forks source link

`FormatTime string_view` not found when importing vegafusion (this used to work) #488

Closed jowens closed 4 months ago

jowens commented 4 months ago

Entirely possible this is not a vegafusion issue, and I don't know what library upgrade caused it, for which I apologize profusely. Any pointer would be appreciated.

Traceback (most recent call last):
  File "./nvperf.py", line 15, in <module>
    import vegafusion as vf
  File "/Users/jowens/Library/Python/3.12/lib/python/site-packages/vegafusion/__init__.py", line 1, in <module>
    from .runtime import runtime
  File "/Users/jowens/Library/Python/3.12/lib/python/site-packages/vegafusion/runtime.py", line 3, in <module>
    import pyarrow as pa
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyarrow/__init__.py", line 65, in <module>
    import pyarrow.lib as _lib
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyarrow/lib.cpython-312-darwin.so, 0x0002): Symbol not found: __ZN4absl12lts_2024011610FormatTimeENS0_11string_viewENS0_4TimeENS0_8TimeZoneE
  Referenced from: <CD063FAB-C5F0-3295-AA51-ECE6EE9CDBA1> /opt/local/lib/libarrow.1300.0.0.dylib
  Expected in:     <42921224-0959-3E0D-BA2B-099ADB608AA7> /opt/local/lib/libabsl_time.2401.0.0.dylib

(MacOS, mix of MacPorts and pip.)

$ pip show vegafusion
Name: vegafusion
Version: 1.6.7
Summary: Core tools for using VegaFusion from Python
Home-page:
Author:
Author-email:
License: BSD-3-Clause
Location: /Users/jowens/Library/Python/3.12/lib/python/site-packages
Requires: altair, pandas, protobuf, psutil, pyarrow
Required-by:
$ python --version
Python 3.12.3
$ port installed | grep arrow
  apache-arrow @13.0.0_9 (active)
  py312-arrow @1.3.0_1 (active)
  py312-pyarrow @13.0.0_9 (active)
jonmmease commented 4 months ago

Hi @jowens, I think there is some version mismatch happening between different arrow shared libraries. I'm not familiar with installing pyarrow through MacPorts, but the version 1.3.0 of py312-arrow not matching version 13.0.0 of py312-pyarrow might be an issue.

If it's a possibility for you, I'd recommend uninstalling all of the (py)arrow packages from MacPorts and then install just the pyarrow package using pip, as this bundles the Python and native arrow dependencies in one package.

jowens commented 4 months ago

Understood. This helps me track down the mismatch! Thank you. I will report back when I identify it in hopes of helping others.

jowens commented 4 months ago

A rebuild of abseil and all its dependencies solved this problem (https://trac.macports.org/ticket/69932). Thanks @jonmmease!