jesse-ai / stack-installer Goto Github PK
View Code? Open in Web Editor NEWA bash script used to install the requied stack for running Jesse.
License: MIT License
A bash script used to install the requied stack for running Jesse.
License: MIT License
Hi!. I use Ubuntu 22.04 and installer script angd get error with Ta-Lib installation.
How i can fix it?
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
╰─> [94 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/talib
copying talib/stream.py -> build/lib.linux-x86_64-cpython-311/talib
copying talib/init.py -> build/lib.linux-x86_64-cpython-311/talib
copying talib/deprecated.py -> build/lib.linux-x86_64-cpython-311/talib
copying talib/abstract.py -> build/lib.linux-x86_64-cpython-311/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/talib
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -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-ajc8a6k4/normal/local/lib/python3.11/dist-packages/numpy/_core/include -I/usr/include/python3.11 -c talib/_ta_lib.c -o build/temp.linux-x86_64-cpython-311/talib/_ta_lib.o
In file included from /tmp/pip-build-env-ajc8a6k4/normal/local/lib/python3.11/dist-packages/numpy/_core/include/numpy/ndarraytypes.h:1909,
from /tmp/pip-build-env-ajc8a6k4/normal/local/lib/python3.11/dist-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-ajc8a6k4/normal/local/lib/python3.11/dist-packages/numpy/_core/include/numpy/arrayobject.h:5,
from talib/_ta_lib.c:1092:
/tmp/pip-build-env-ajc8a6k4/normal/local/lib/python3.11/dist-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 "
| ^~~~~~~
In file included from /usr/include/python3.11/Python.h:38,
from talib/_ta_lib.c:16:
talib/_ta_lib.c: In function ‘__pyx_f_5numpy_PyDataType_SHAPE’:
talib/_ta_lib.c:10093:39: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
10093 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
| ^~
/usr/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
24 | #define _Py_CAST(type, expr) ((type)(expr))
| ^~~~
/usr/include/python3.11/object.h:506:35: note: in expansion of macro ‘_PyObject_CAST’
506 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
| ^~~~~~~~~~~~~~
talib/_ta_lib.c:1527:27: note: in expansion of macro ‘Py_INCREF’
1527 | #define __Pyx_INCREF(r) Py_INCREF(r)
| ^~~~~~~~~
talib/_ta_lib.c:10093:5: note: in expansion of macro ‘__Pyx_INCREF’
10093 | __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
| ^~~~~~~~~~~~
talib/_ta_lib.c:10094:36: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘subarray’
10094 | __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
| ^~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_348_ta_getFuncInfo’:
talib/_ta_lib.c:51556:48: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
51556 | __pyx_v_retCode = TA_GetFuncInfo(__pyx_t_1, (&__pyx_v_info));
| ~^~~~~~~~~~~~~~
| |
| TA_FuncInfo **
In file included from talib/_ta_lib.c:1084:
/usr/include/ta-lib/ta_abstract.h:211:48: note: expected ‘const TA_FuncInfo **’ but argument is of type ‘TA_FuncInfo **’
211 | const TA_FuncInfo **funcInfo );
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_350_ta_getInputParameterInfo’:
talib/_ta_lib.c:51832:71: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
51832 | __pyx_v_retCode = TA_GetInputParameterInfo(__pyx_t_1, __pyx_v_idx, (&__pyx_v_info));
| ~^~~~~~~~~~~~~~
| |
| TA_InputParameterInfo **
In file included from talib/_ta_lib.c:1084:
/usr/include/ta-lib/ta_abstract.h:442:68: note: expected ‘const TA_InputParameterInfo **’ but argument is of type ‘TA_InputParameterInfo **’
442 | const TA_InputParameterInfo **info );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_352_ta_getOptInputParameterInfo’:
talib/_ta_lib.c:52084:74: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
52084 | __pyx_v_retCode = TA_GetOptInputParameterInfo(__pyx_t_1, __pyx_v_idx, (&__pyx_v_info));
| ~^~~~~~~~~~~~~~
| |
| TA_OptInputParameterInfo **
In file included from talib/_ta_lib.c:1084:
/usr/include/ta-lib/ta_abstract.h:446:74: note: expected ‘const TA_OptInputParameterInfo **’ but argument is of type ‘TA_OptInputParameterInfo **’
446 | const TA_OptInputParameterInfo **info );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_354_ta_getOutputParameterInfo’:
talib/_ta_lib.c:52374:72: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
52374 | __pyx_v_retCode = TA_GetOutputParameterInfo(__pyx_t_1, __pyx_v_idx, (&__pyx_v_info));
| ~^~~~~~~~~~~~~~
| |
| TA_OutputParameterInfo **
In file included from talib/_ta_lib.c:1084:
/usr/include/ta-lib/ta_abstract.h:450:70: note: expected ‘const TA_OutputParameterInfo **’ but argument is of type ‘TA_OutputParameterInfo **’
450 | const TA_OutputParameterInfo **info );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
talib/_ta_lib.c: In function ‘__pyx_f_5talib_7_ta_lib___ta_getFuncHandle’:
talib/_ta_lib.c:53011:126: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type [-Wincompatible-pointer-types]
53011 | __pyx_t_1 = __pyx_f_5talib_7_ta_lib__ta_check_success(__pyx_n_s_TA_GetFuncHandle, TA_GetFuncHandle(__pyx_v_function_name, (&__pyx_v_handle)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L1_error)
| ~^~~~~~~~~~~~~~~~
| |
| TA_FuncHandle ** {aka unsigned int **}
In file included from talib/_ta_lib.c:1084:
/usr/include/ta-lib/ta_abstract.h:155:52: note: expected ‘const TA_FuncHandle **’ {aka ‘const unsigned int **’} but argument is of type ‘TA_FuncHandle **’ {aka ‘unsigned int **’}
155 | const TA_FuncHandle **handle );
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
error: command '/usr/bin/x86_64-linux-gnu-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)
On a fresh Hetzner Ubuntu 20.04, I have run stack-installer/ubuntu-20.04.sh
.
After that, I cannot import talib (and neither can jesse import it):
$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import talib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/till/.local/lib/python3.8/site-packages/talib/__init__.py", line 93, in <module>
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
But a pip3 uninstall TA-lib; pip3 install TA-lib
solves the problem, and you get _ta_lib.cpython-38-x86_64-linux-gnu.so
as well. So it seems that there is no need to compile it from sources.
I get the error:
Running setup.py install for TA-Lib ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_qeshkx/ta-lib_24d021906e3d455e90b8374d98a986c6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_qeshkx/ta-lib_24d021906e3d455e90b8374d98a986c6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xi9fbmv_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/TA-Lib
cwd: /tmp/pip-install-0_qeshkx/ta-lib_24d021906e3d455e90b8374d98a986c6/
Complete output (26 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/talib
copying talib/test_stream.py -> build/lib.linux-x86_64-3.8/talib
copying talib/stream.py -> build/lib.linux-x86_64-3.8/talib
copying talib/test_data.py -> build/lib.linux-x86_64-3.8/talib
copying talib/abstract.py -> build/lib.linux-x86_64-3.8/talib
copying talib/test_pandas.py -> build/lib.linux-x86_64-3.8/talib
copying talib/deprecated.py -> build/lib.linux-x86_64-3.8/talib
copying talib/__init__.py -> build/lib.linux-x86_64-3.8/talib
copying talib/test_abstract.py -> build/lib.linux-x86_64-3.8/talib
copying talib/test_func.py -> build/lib.linux-x86_64-3.8/talib
running build_ext
skipping 'talib/_ta_lib.c' Cython extension (up-to-date)
building 'talib._ta_lib' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/talib
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -I/usr/include/python3.8 -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.8/talib/_ta_lib.o
talib/_ta_lib.c:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_qeshkx/ta-lib_24d021906e3d455e90b8374d98a986c6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_qeshkx/ta-lib_24d021906e3d455e90b8374d98a986c6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xi9fbmv_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/TA-Lib Check the logs for full command output.
Which is related to Ta-lib installation. @TheCrazyLex can you look into it please? I can get you a new Hetzner VPS to look into it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.