talib/__init__.py need to be updated
Python 3.13.1 (main, Feb 9 2025, 06:28:54) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import talib Traceback (most recent call last): File "
", line 1, in import talib File "/home/xxxxx/ta-lib-python/talib/init.py", line 109, in from ._ta_lib import ( ...<6 lines>... ) ModuleNotFoundError: No module named 'talib._ta_lib'
after change it to from ._ta_lib to ._ta-lib import, talib can be imported successfully.
In the same init.py file there is another from ._ta_lib import * at line 119 passed without any issue. wondering why.
thinking of that from ._ta_lib import * can do everything with this from ._ta_lib import ( ...<6 lines>... ), so I simply remove these from ._ta_lib import ( ...<6 lines>... ). it works.
I don't understand why your module would be _ta-lib, its building talib/_ta_lib.c and making something like _ta_lib.cpython-311-darwin.so
$ ls talib
__init__.py _ta_lib.c abstract.py
__pycache__/ _ta_lib.cpython-311-darwin.so* common.pxd
_abstract.pxi _ta_lib.cpython-312-darwin.so* deprecated.py
_common.pxi _ta_lib.pxd py.typed
_func.pxi _ta_lib.pyi stream.py
_stream.pxi _ta_lib.pyx
Usually that error indicates the installation didn't finish compiling properly, usually indicative of missing dependencies.
That's right. I tried again from windows using installation from source, and this time it did work. The error message I received when tried to do the same from Linux/ubuntu. anyway. 0.6.1 works perfect for me.
what version of the underlying TA-Lib C library do you have?
what version of the underlying TA-Lib C library do you have?
0.6.4