Closed wilker06 closed 1 year ago
Follow the directions in the README. $ python3.11 -m pip install ta-libMake sure the architectures match. On Mar 26, 2023, at 10:16 PM, wilker06 @.***> wrote: I used and liked ta-lib on Mac m1 with python3.10. For some reason, I moved on to 3.11. Unfortunately, I could not make ta-lib running again. For example, applying WMA the error '... WMA not found in init' pops up. Could you kindly advise how to fix th issue.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
I tried everything recommended in readme ....
Ignoring this and running any code that include ta-lib import and a method with WMA, it ends up in a lengthy error message even if the method with WMA is not called.
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
coro = func()
^^^^^^
File "", line 1, in
Another comment: most common is the message: ImportError: dlopen(/Users/.../GitHub/Trading/venv/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'
Sounds like a mixed architecture issue. You should uninstall it and reinstall. You shouldn’t need to arch -arm64 if brew is native in /opt.Instead of pycharm and the virtual env, just get it working in the terminal first. It’s 100% works and supported. On Mar 27, 2023, at 2:11 AM, wilker06 @.***> wrote: Another comment: most common is the message: ImportError: dlopen(/Users/.../GitHub/Trading/venv/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Hi John,
I followed your advice to build a new, clear python application:
Run simple test code in PyCharm:
import talib as ta
print('soso‘)
It ends up with the error:
Traceback (most recent call last):
File "/Users/…/GitHub/Trading_310/test.py", line 1, in
Last login: Thu Mar 30 20:26:49 on ttys000
cd '/Users/... /GitHub/Trading_310/' && '/usr/local/bin/python3' '/Users/... /GitHub/Trading_310/test.py' && echo Exit status: $? && exit 1
... @MBP-von-Kersten ~ % cd '/Users/... /GitHub/Trading_310/' && '/usr/local/bin/python3' '/Users/... /GitHub/Trading_310/test.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/... /GitHub/Trading_310/test.py", line 1, in
I attach also a screenshot of the pyCHharm Project window
Any idea? Thank you in advance for your kind advice!
Best regards,
Kersten
Am 27.03.2023 um 15:31 schrieb John Benediktsson @.***>:
Sounds like a mixed architecture issue. You should uninstall it and reinstall. You shouldn’t need to arch -arm64 if brew is native in /opt.Instead of pycharm and the virtual env, just get it working in the terminal first. It’s 100% works and supported. On Mar 27, 2023, at 2:11 AM, wilker06 @.***> wrote: Another comment: most common is the message: ImportError: dlopen(/Users/.../GitHub/Trading/venv/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

Have you tried:
# check that it's using ``/opt`` which is for arm64 builds
$ which brew
/opt/homebrew/bin/brew
$ brew install ta-lib
$ export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
$ export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
$ python3.11 -m pip install ta-lib
Hi John,
I got it work again, found some Python traces from earlier installations, very deep at the system.
Kind regards
Kersten
Am 27.03.2023 um 15:31 schrieb John Benediktsson @.***>:
Sounds like a mixed architecture issue. You should uninstall it and reinstall. You shouldn’t need to arch -arm64 if brew is native in /opt.Instead of pycharm and the virtual env, just get it working in the terminal first. It’s 100% works and supported. On Mar 27, 2023, at 2:11 AM, wilker06 @.***> wrote: Another comment: most common is the message: ImportError: dlopen(/Users/.../GitHub/Trading/venv/lib/python3.11/site-packages/talib/_ta_lib.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_TA_ACOS'
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/TA-Lib/ta-lib-python/issues/587#issuecomment-1485098176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV37BZNJAFXKT533Y4G3PVTW6GJE3ANCNFSM6AAAAAAWIJBVVY. You are receiving this because you authored the thread.
here is what worked for me (Apple M2 Max, Sonoma 14.4)
python3.11 pip uninstall ta-lib
export HOMEBREW_PREFIX=/opt/homebrew #set to your homebrew prefix export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include" export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
python3.11 -m pip install --no-cache-dir ta-lib
@iKpoxa: thank you for the advice. As I already wrote on Apr 7, 2023 I followed John's advice and got it work again. Works fine since!
I used and liked ta-lib on Mac m1 with python3.10. For some reason, I moved on to 3.11. Unfortunately, I could not make ta-lib running again. For example, applying WMA the error '... WMA not found in init' pops up. Could you kindly advise how to fix th issue.