'Unable to install TA-lib on aws ec2
I Desparately need to use EC2 library in the aws but not able to do this. I am getting following error while doing pip install :
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7v639s64/ta-lib_9db6730e7f8240d6bb07f92217ece3c8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7v639s64/ta-lib_9db6730e7f8240d6bb07f92217ece3c8/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-eubzqk5x/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ec2-user/.local/include/python3.8/ta-lib
cwd: /tmp/pip-install-7v639s64/ta-lib_9db6730e7f8240d6bb07f92217ece3c8/
Complete output (59 lines):
running install
/usr/local/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
building 'talib._ta_lib' extension
In file included from /home/ec2-user/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969:0,
from /home/ec2-user/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/ec2-user/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from talib/_ta_lib.c:689:
/home/ec2-user/.local/lib/python3.8/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]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_348_ta_getFuncInfo’:
talib/_ta_lib.c:38706:103: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_retCode = TA_GetFuncInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), (&__pyx_v_info));
^
In file included from talib/_ta_lib.c:684:0:
/usr/include/ta-lib/ta_abstract.h:210:12: note: expected ‘const TA_FuncInfo ** {aka const struct TA_FuncInfo **}’ but argument is of type ‘TA_FuncInfo ** {aka struct TA_FuncInfo **}’
TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle,
^~~~~~~~~~~~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_350_ta_getInputParameterInfo’:
talib/_ta_lib.c:38977:126: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_retCode = TA_GetInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
^
In file included from talib/_ta_lib.c:684:0:
/usr/include/ta-lib/ta_abstract.h:440:12: note: expected ‘const TA_InputParameterInfo ** {aka const struct TA_InputParameterInfo **}’ but argument is of type ‘TA_InputParameterInfo ** {aka struct TA_InputParameterInfo **}’
TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle,
^~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_352_ta_getOptInputParameterInfo’:
talib/_ta_lib.c:39227:129: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_retCode = TA_GetOptInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
^
In file included from talib/_ta_lib.c:684:0:
/usr/include/ta-lib/ta_abstract.h:444:12: note: expected ‘const TA_OptInputParameterInfo ** {aka const struct TA_OptInputParameterInfo **}’ but argument is of type ‘TA_OptInputParameterInfo ** {aka struct TA_OptInputParameterInfo **}’
TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_354_ta_getOutputParameterInfo’:
talib/_ta_lib.c:39473:127: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_retCode = TA_GetOutputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
^
In file included from talib/_ta_lib.c:684:0:
/usr/include/ta-lib/ta_abstract.h:448:12: note: expected ‘const TA_OutputParameterInfo ** {aka const struct TA_OutputParameterInfo **}’ but argument is of type ‘TA_OutputParameterInfo ** {aka struct TA_OutputParameterInfo **}’
TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle,
^~~~~~~~~~~~~~~~~~~~~~~~~
talib/_ta_lib.c: In function ‘__pyx_f_5talib_7_ta_lib___ta_getFuncHandle’:
talib/_ta_lib.c:40072:125: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type [-Wincompatible-pointer-types]
__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, 751, __pyx_L1_error)
^
In file included from talib/_ta_lib.c:684:0:
/usr/include/ta-lib/ta_abstract.h:154:12: note: expected ‘const TA_FuncHandle ** {aka const unsigned int **}’ but argument is of type ‘TA_FuncHandle ** {aka unsigned int **}’
TA_RetCode TA_GetFuncHandle( const char *name,
^~~~~~~~~~~~~~~~
as: out of memory allocating 4064 bytes after a total of 98127872 bytes
{standard input}: Assembler messages:
{standard input}:1743693: Fatal error: can't close build/temp.linux-x86_64-3.8/talib/_ta_lib.o: Memory exhausted
error: command '/usr/bin/gcc' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7v639s64/ta-lib_9db6730e7f8240d6bb07f92217ece3c8/setup.py'"'"'; file='"'"'/tmp/pip-install-7v639s64/ta-lib_9db6730e7f8240d6bb07f92217ece3c8/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-eubzqk5x/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ec2-user/.local/include/python3.8/ta-lib Check the logs for full command output.
Things I have tried :
1.download from http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
2.untar tar -xvf ta-lib-0.4.0-src.tar.gz
3.cd /../ta-lib
4./configure --prefix=/usr
5.make
6.sudo make install
- pip install ta-lib
pip3 install --upgrade setuptools
sudo yum install python-devel
Have tried all the things related to gcc and TA-lib, still getting the same error. Is this specific to EC2?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
