TA-Lib/ta-lib-python

symbol not found in flat namespace '_TA_ACOS' on MAC M1.

dcgithubaccount opened this issue · 3 comments

I am getting below error when i upgraded python to 3.11 from 3.8. The talib was working on M1 before that. I also follwed an old issue on this topic but i couldn't help myself.
from ._ta_lib import ( ImportError: dlopen(/Users/deepakchoudhary/anaconda3/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'

I followed below steps
brew uninstall ta-lib
pip uninstall ta-lib
arch -arm64 brew install ta-lib
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
pip install TA-Lib
otool -L /Users/deepakchoudhary/anaconda3/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so

/Users/deepakchoudhary/anaconda3/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.61.1)

Any guidance will be really helpful.

mrjbq7 commented
mrjbq7 commented

Thanks for the input. I downloaded the homebrew for Apple Silicon and pip reinstalled with
pip install TA-LIB --no-cache-dir
and it worked like charm.