-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Macbook M1 ERROR: Failed to build installable wheels for some pyproject.toml based projects (ta-lib) #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
some supplement: Python 3.8.2 (default, Apr 8 2021, 23:19:18) |
More supplement.
2.Running on the JupyterLab seems ok. Will take this as a workaround at this moment. !pip install --no-cache-dir ta-lib Collecting ta-lib |
I see in the output you pasted you are trying to use numpy 1.24. That is only supported right now in the ta-lib 0.4.x release with the underlying C library version 0.4.x also.
The 0.5 branch and 0.6 branches are numpy 2
|
Thanks for the reply. Actually I tried 0.4.38 in Terminal as below before but hit the same error. |
You need 0.4.x of the ta-lib C library if you do that.
Your output shows you installed 0.6.4 from brew.
…On Wed, Apr 9, 2025 at 8:23 PM Jerry ***@***.***> wrote:
Thanks for the reply.
Actually I tried 0.4.38 in Terminal as below before but hit the same error.
"python3 -m pip install --no-cache-dir ta-lib==0.4.38"
—
Reply to this email directly, view it on GitHub
<#720 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF5AZA7YVXXYY33LQCG5D2YT7MRAVCNFSM6AAAAAB2YK3YHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGM2TKNJVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
*25370025* left a comment (TA-Lib/ta-lib-python#720)
<#720 (comment)>
Thanks for the reply.
Actually I tried 0.4.38 in Terminal as below before but hit the same error.
"python3 -m pip install --no-cache-dir ta-lib==0.4.38"
—
Reply to this email directly, view it on GitHub
<#720 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF5AZA7YVXXYY33LQCG5D2YT7MRAVCNFSM6AAAAAB2YK3YHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGM2TKNJVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks for your new info. As the JupyterLab one works now and I'll finished my task first, then try your suggestion later. |
I followed your guide on OS.
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/formula.jws.json
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/api/cask.jws.json
Warning: ta-lib 0.6.4 is already installed and up-to-date.
export [DONE]
$ export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
$ export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
run "python3 -m pip install --no-cache-dir ta-lib" [FAILED]
Defaulting to user installation because normal site-packages is not writeable
Collecting ta-lib
Downloading ta_lib-0.6.3.tar.gz (376 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from ta-lib) (41.2.0)
Collecting numpy (from ta-lib)
Downloading numpy-1.24.4-cp38-cp38-macosx_11_0_arm64.whl.metadata (5.6 kB)
Downloading numpy-1.24.4-cp38-cp38-macosx_11_0_arm64.whl (13.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.8/13.8 MB 6.9 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
╰─> [108 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/abstract.py -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/deprecated.py -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/init.py -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/stream.py -> build/lib.macosx-10.14.6-arm64-cpython-38/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.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_common.pxi -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_func.pxi -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_stream.pxi -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_ta_lib.c -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_ta_lib.pyi -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/_ta_lib.pyx -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
copying talib/py.typed -> build/lib.macosx-10.14.6-arm64-cpython-38/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.macosx-10.14.6-arm64-cpython-38/talib
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/opt/homebrew/opt/ta-lib/include -I/private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/normal/lib/python3.8/site-packages/numpy/core/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c talib/_ta_lib.c -o build/temp.macosx-10.14.6-arm64-cpython-38/talib/_ta_lib.o
In file included from talib/_ta_lib.c:1235:
In file included from /private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/normal/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5:
In file included from /private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/normal/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/normal/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940:
/private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/normal/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with "
^
talib/_ta_lib.c:10174:13: error: implicit declaration of function 'PyDataType_ELSIZE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyDataType_ELSIZE(__pyx_v_self);
^
talib/_ta_lib.c:10187:13: error: implicit declaration of function 'PyDataType_ALIGNMENT' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
^
talib/_ta_lib.c:10204:15: error: implicit declaration of function 'PyDataType_FIELDS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
^
talib/_ta_lib.c:10204:13: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
__pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:10225:15: error: implicit declaration of function 'PyDataType_NAMES' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
^
talib/_ta_lib.c:10225:13: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
__pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:10242:13: error: implicit declaration of function 'PyDataType_SUBARRAY' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
^
talib/_ta_lib.c:10242:11: warning: incompatible integer to pointer conversion assigning to 'PyArray_ArrayDescr *' (aka 'struct _arr_descr *') from 'int' [-Wint-conversion]
__pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:10255:13: error: implicit declaration of function 'PyDataType_FLAGS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyDataType_FLAGS(__pyx_v_self);
^
talib/_ta_lib.c:10268:13: error: implicit declaration of function 'PyArray_MultiIter_NUMITER' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
^
talib/_ta_lib.c:10281:13: error: implicit declaration of function 'PyArray_MultiIter_SIZE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
^
talib/_ta_lib.c:10294:13: error: implicit declaration of function 'PyArray_MultiIter_INDEX' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
^
talib/_ta_lib.c:10307:13: error: implicit declaration of function 'PyArray_MultiIter_NDIM' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
^
talib/_ta_lib.c:10320:13: error: implicit declaration of function 'PyArray_MultiIter_DIMS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
^
talib/_ta_lib.c:10320:11: warning: incompatible integer to pointer conversion assigning to 'npy_intp *' (aka 'long *') from 'int' [-Wint-conversion]
__pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:10333:13: error: implicit declaration of function 'PyArray_MultiIter_ITERS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
^
talib/_ta_lib.c:10333:11: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
__pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c:101887:76: warning: code will never be executed [-Wunreachable-code]
if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
^~~~~~~~
talib/_ta_lib.c:101887:73: note: silence by adding parentheses to mark code as explicitly dead
if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
^
/ DISABLES CODE */ ( )
talib/_ta_lib.c:105008:5: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
0,
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
8 warnings and 12 errors generated.
/private/var/folders/wj/5n2_4syj2vl0m2f49kkn390w0000gn/T/pip-build-env-dkyx6v_n/overlay/lib/python3.8/site-packages/setuptools/config/_apply_pyprojecttoml.py:78: SetuptoolsWarning:
install_requires
overwritten inpyproject.toml
(dependencies)corresp(dist, value, root_dir)
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: Failed to build installable wheels for some pyproject.toml based projects (ta-lib)
The text was updated successfully, but these errors were encountered: