-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Hi all,
I am unable to install ta-lib using pip on arch linux. I have a python virtual environment in which I am trying to install ta-lib.
I have downloaded ta-lib 0.6.4 and have followed the installation instructions for the c++ library without a problem.
Basically, here is what I did.
wget https://github.com/TA-Lib/ta-lib/releases/download/v0.6.4/ta-lib-0.6.4-src.tar.gz However, I am having an issue with python.
When I do
pip install ta-lib --no-cache
I get the following errors.
``
(ml_clean) [pranav@archlinux ta-lib]$ pip install ta-lib --no-cache
Collecting ta-lib
Downloading ta_lib-0.6.1.tar.gz (372 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting setuptools (from ta-lib)
Downloading setuptools-75.8.0-py3-none-any.whl.metadata (6.7 kB)
Collecting numpy (from ta-lib)
Downloading numpy-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
Downloading numpy-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.1/16.1 MB 115.0 MB/s eta 0:00:00
Downloading setuptools-75.8.0-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 219.1 MB/s eta 0:00:00
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
╰─> [44 lines of output]
:83: UserWarning: Cannot find ta-lib library, installation may fail.
/tmp/pip-build-env-d55kls/overlay/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:81: SetuptoolsWarning: install_requires overwritten in pyproject.toml (dependencies)
corresp(dist, value, root_dir)
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-313/talib
copying talib/init.py -> build/lib.linux-x86_64-cpython-313/talib
copying talib/abstract.py -> build/lib.linux-x86_64-cpython-313/talib
copying talib/deprecated.py -> build/lib.linux-x86_64-cpython-313/talib
copying talib/stream.py -> build/lib.linux-x86_64-cpython-313/talib
running egg_info
writing ta_lib.egg-info/PKG-INFO
writing dependency_links to ta_lib.egg-info/dependency_links.txt
writing requirements to ta_lib.egg-info/requires.txt
writing top-level names to ta_lib.egg-info/top_level.txt
reading manifest file 'ta_lib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'ta_lib.egg-info/SOURCES.txt'
copying talib/_abstract.pxi -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_common.pxi -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_func.pxi -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_stream.pxi -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_ta_lib.c -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_ta_lib.pyi -> build/lib.linux-x86_64-cpython-313/talib
copying talib/_ta_lib.pyx -> build/lib.linux-x86_64-cpython-313/talib
copying talib/py.typed -> build/lib.linux-x86_64-cpython-313/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.linux-x86_64-cpython-313/talib
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -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/tmp/pip-build-env-d55kls/normal/lib/python3.13/site-packages/numpy/_core/include -I/home/pranav/.virtualenvs/ml_clean/include -I/usr/include/python3.13 -c talib/_ta_lib.c -o build/temp.linux-x86_64-cpython-313/talib/_ta_lib.o
In file included from /tmp/pip-build-env-d55kls/normal/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarraytypes.h:1913,
from /tmp/pip-build-env-d55kls/normal/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-d55kls/normal/lib/python3.13/site-packages/numpy/_core/include/numpy/arrayobject.h:5,
from talib/_ta_lib.c:1235:
/tmp/pip-build-env-d55kls/normal/lib/python3.13/site-packages/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
gcc -shared -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto build/temp.linux-x86_64-cpython-313/talib/_ta_lib.o -L/usr/lib -L/usr/local/lib -L/usr/lib64 -L/usr/local/lib64 -L/opt/lib -L/opt/local/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/ta-lib/lib -L/usr/lib -Wl,--enable-new-dtags,-rpath,/usr/lib -Wl,--enable-new-dtags,-rpath,/usr/local/lib -Wl,--enable-new-dtags,-rpath,/usr/lib64 -Wl,--enable-new-dtags,-rpath,/usr/local/lib64 -Wl,--enable-new-dtags,-rpath,/opt/lib -Wl,--enable-new-dtags,-rpath,/opt/local/lib -Wl,--enable-new-dtags,-rpath,/opt/homebrew/lib -Wl,--enable-new-dtags,-rpath,/opt/homebrew/opt/ta-lib/lib -lta-lib -o build/lib.linux-x86_64-cpython-313/talib/_ta_lib.cpython-313-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lta-lib: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/gcc' 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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (ta-lib)
``
How do I fix this problem?