-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How to change TA-Lib C library to arm64? #682
Comments
if you migrated from an intel mac, then your brew is probably you might also have python's installed that are intel. it only works if your TA-Lib C library (brew install ta-lib) matches your python (brew install python) which matches your ta-lib python module (pip install ta-lib). The other problem that happens sometimes is the |
you do not want to do |
Thank you for the quick response. You're correct it appears i am using /usr/local/bin/brew What is the best way to switch to opt/? |
Install it again using their directions: |
You'll end up with "two brews", and can decide if you need intel libraries (keep /usr/local homebrew stuff) or not (delete /usr/local homebrew stuff). |
So i deleted the old brew and reinstall the the new brew in opt/ Unfortunately the brew command stop working so i alias'd the brew command to the opt/ version of brew. (base) ja*****@Mac ~ % which brew (base) ja*****@Mac ~ % arch -arm64 brew install ta-lib (base) ja*****@Mac ~ % |
On my apple silicon mac:
You don't need |
Going through all those commands i have the same output. But i still get the error: ImportError: dlopen(/Users/ja***/opt/anaconda3/lib/python3.12/site-packages/talib/_ta_lib.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS' |
I have just seen that Notebook looks to still be pointing at usr version of brew. Last login: Sun Nov 10 13:54:21 on ttys001 sorry im aware we are moving further away from a TALIB issue now but do you have any idea how to change this to the new brew version |
I'm sorry it's frustrating, moving from intel to apple silicon was for me too until i had all this stuff split out. I would guess your python is still intel, but here's generally how I think about it: do i have arm64 brew
do i have arm64 ta-lib
do i have arm64 python
install the arm64 python ta-lib
or use a venv
|
This message |
Note: it is possible for you to run intel python with intel brew with intel ta-lib on apple silicon mac. it just requires keeping your environment consistent. unless you need a mixed environment (which i do for different dev reasons), i suggest going all apple silicon and removing the intel libraries and python's you used to use. |
And you might want to uninstall old ta-lib python first |
.zprofile updated but hasn't fixed the '_TA_ACOS' issue. Unfortunately i am moving all my python packages to Arm64 as i was having other issues trying to operate the intel python and im now making the effort to get it all running correctly on arm64. is there a way to dirrectly address the import error? ImportError: dlopen(/Users/ja***/opt/anaconda3/lib/python3.12/site-packages/talib/_ta_lib.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS' my bashprofile is still reading Setting PATH for Python 3.9The original version is saved in .bash_profile.pysavePATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}" do you think this could be the issue? |
The bash message seems to relate to system python 3.9, but your install is anaconda python 3.12. In this case, I personally would probably delete If you're sure that |
Then test it with
|
Unfortunately i just could not get it to work. All packages have been installed correctly with the correct arm64 all bash and zsh profile are correct but i still get the '_TA_ACOS' error. It seems to be the only package that is having issues installing so i have decided to migrate to btalib which is working. hope others manage to get it sorted, thanks for your help @mrjbq7 |
My best guess is your anaconda python is still intel, but I'm not sure.
|
I have recently changed to an M3 mac and i am struggling to get TA-Lib to install correctly.
I have uninstalled and reinstalled TA-Lib multiple times now.
I first performed un-installs as follow:
brew uninstall ta-lib
pip uninstall ta-lib
Then I followed the instructions in the ReadMe:
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
ERROR: symbol not found in flat namespace '_TA_ACOS'
I think the issue is TA-Lib C Library is not arm64
Comand:
file $(brew --prefix ta-lib)/lib/libta_lib.dylib
Returns:
Mach-O 64-bit dynamically linked shared library x86_64
while everything else is running on arm64, i just cant work out how to switch the C library to arm64 i have tried so many different un/reinstall suggestions from the online forums and have had no luck.
thanks in advance
The text was updated successfully, but these errors were encountered: