TA-Lib / ta-lib-python

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

ISSUE WITH INSTALL ta-lib on MAC Studio #646

Closed CryptoVizArt closed 1 month ago

CryptoVizArt commented 2 months ago

Here is the issue

pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.28.tar.gz (357 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ta-lib) (1.26.2) Building wheels for collected packages: ta-lib Building wheel for ta-lib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for ta-lib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output]

:77: UserWarning: Cannot find ta-lib library, installation may fail. running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-cpython-311 creating build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/abstract.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/deprecated.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/__init__.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/stream.py -> build/lib.macosx-10.9-universal2-cpython-311/talib running build_ext building 'talib._ta_lib' extension creating build/temp.macosx-10.9-universal2-cpython-311 creating build/temp.macosx-10.9-universal2-cpython-311/talib clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/private/var/folders/ws/rcgjwb7j4cvgmzk019k3mxg80000gn/T/pip-build-env-tctdzwb5/normal/lib/python3.11/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c talib/_ta_lib.c -o build/temp.macosx-10.9-universal2-cpython-311/talib/_ta_lib.o talib/_ta_lib.c:1082:10: fatal error: 'ta-lib/ta_defs.h' file not found #include "ta-lib/ta_defs.h" ^~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ta-lib Failed to build ta-lib ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects
mrjbq7 commented 2 months ago

You need to install the C library dependency first. It did print this warning::77: UserWarning: Cannot find ta-lib library, installation may fail.Follow the README installation, it’s pretty straightforward.  On May 3, 2024, at 1:12 AM, CryptoVizArt @.***> wrote: Here is the issue pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.28.tar.gz (357 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ta-lib) (1.26.2) Building wheels for collected packages: ta-lib Building wheel for ta-lib (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for ta-lib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] :77: UserWarning: Cannot find ta-lib library, installation may fail. running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-cpython-311 creating build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/abstract.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/deprecated.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/init.py -> build/lib.macosx-10.9-universal2-cpython-311/talib copying talib/stream.py -> build/lib.macosx-10.9-universal2-cpython-311/talib running build_ext building 'talib._ta_lib' extension creating build/temp.macosx-10.9-universal2-cpython-311 creating build/temp.macosx-10.9-universal2-cpython-311/talib clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/private/var/folders/ws/rcgjwb7j4cvgmzk019k3mxg80000gn/T/pip-build-env-tctdzwb5/normal/lib/python3.11/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c talib/_ta_lib.c -o build/temp.macosx-10.9-universal2-cpython-311/talib/_ta_lib.o talib/_ta_lib.c:1082:10: fatal error: 'ta-lib/ta_defs.h' file not found

include "ta-lib/ta_defs.h"

^~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ta-lib Failed to build ta-lib ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>