TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.49k stars 1.74k forks source link

already install but still error #512

Closed Easyzhan closed 2 years ago

Easyzhan commented 2 years ago

Traceback (most recent call last): File "", line 1007, in _find_and_load File "", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named 'talib'

trufanov-nok commented 2 years ago

could you provide us with more details?

Easyzhan commented 2 years ago

macox,i had install,but can't use it,

image

when run in pycharm:

import talib File "/Users/natsu/Music/coinphilosophy/venv/lib/python3.9/site-packages/talib/init.py", line 93, in from ._ta_lib import ( File "talib/_ta_lib.pyx", line 1, in init talib._ta_lib ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

when debug : Traceback (most recent call last): File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/natsu/Music/coinphilosophy/venv/lib/python3.9/site-packages/talib/init.py", line 93, in from ._ta_lib import ( File "talib/_ta_lib.pyx", line 1, in init talib._ta_lib ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

trufanov-nok commented 2 years ago

Try

sudo pip uninstall ta-lib
sudo pip cache remove TA_Lib-*
sudo pip install ta-lib

This should rebuild the wrapper with currently installed numpy 1.22.3 ignoring the cached wheels which seems to be build with older numpy version.

mrjbq7 commented 2 years ago

Closing all installation issues, if someone has a specific problem please open a new one.