Skip to content
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

symbol not found in flat namespace '_TA_ACOS' #24

Open
edbond opened this issue Feb 3, 2025 · 1 comment
Open

symbol not found in flat namespace '_TA_ACOS' #24

edbond opened this issue Feb 3, 2025 · 1 comment

Comments

@edbond
Copy link

edbond commented Feb 3, 2025

Using uv
Macbook intel
ta-lib installed from brew

> uv run ipython3
Python 3.13.1 (main, Dec  3 2024, 17:59:52) [Clang 16.0.0 (clang-1600.0.26.4)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.32.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import polars_talib
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import polars_talib

File ~/Projects/zxc/.venv/lib/python3.13/site-packages/polars_talib/__init__.py:4
      2 import polars as pl
      3 from .utils import register_plugin, parse_version
----> 4 from ._polars_talib import initialize, shutdown, version
      5 from pathlib import Path
      8 __talib_version__ = version()

ImportError: dlopen(/Users/eduard/Projects/composer/.venv/lib/python3.13/site-packages/polars_talib/_polars_talib.abi3.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'

I've read several related issues in ta-lib, nothing helps.
TA-Lib/ta-lib-python#635
TA-Lib/ta-lib-python#563
TA-Lib/ta-lib-python#408

I'm not on Apple chip, using Intel

@edbond
Copy link
Author

edbond commented Feb 3, 2025

I cloned the project, ran uv build

Successfully built dist/polars_talib-0.1.5.tar.gz
Successfully built dist/polars_talib-0.1.5-cp37-abi3-macosx_10_12_x86_64.whl

and installed in my project using:

╰─❯ uv add ../polars_ta_extension/dist/polars_talib-0.1.5-cp37-abi3-macosx_10_12_x86_64.whl
Resolved 64 packages in 606ms
   Built zxc @ file:///Users/eduard/Projects/zxc
Prepared 1 package in 1.21s
Uninstalled 2 packages in 10ms
Installed 2 packages in 4ms
...
 - polars-talib==0.1.5
 + polars-talib==0.1.5 (from file:///Users/eduard/Projects/polars_ta_extension/dist/polars_talib-0.1.5-cp37-abi3-macosx_10_12_x86_64.whl)

now works fine:

╰─❯ uv run ipython
Python 3.13.1 (main, Dec  3 2024, 17:59:52) [Clang 16.0.0 (clang-1600.0.26.4)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.32.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import polars_talib as plta
   ...:
   ...: # list of functions
   ...: plta.get_functions()
   ...:
   ...: # dict of functions by group
   ...: plta.get_function_groups()
Out[1]:
{'Cycle Indicators': ['ht_dcperiod',
  'ht_dcphase',
  'ht_phasor',
  'ht_sine',
  'ht_trendmode'],
 'Math Operators': ['add',
  'div',
...

Seems something broken with build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant