TA-Lib / ta-lib-python

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

cannot install ta-lib on amazong sagemaker #485

Closed R-LP closed 2 years ago

R-LP commented 2 years ago

Hi,

I can't manage to install TA-LIB on amazon sage maker; the error is very weird:

Making install in src
/bin/sh: line 17: cd: src: Not a directory
make: *** [install-recursive] Error 1 
bash-4.2$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... no
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for ANSI C header files... (cached) yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working volatile... yes
checking for ptrdiff_t... yes
checking return type of signal handlers... void
checking for working strcoll... yes
checking for strftime... yes
checking for working strtod... yes
checking for vprintf... yes
checking for _doprnt... no
checking for floor... no
checking for isascii... yes
checking for localeconv... yes
checking for mblen... yes
checking for memmove... yes
checking for memset... yes
checking for modf... yes
checking for pow... no
checking for sqrt... no
checking for strcasecmp... yes
checking for strchr... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/ta_abstract/Makefile
config.status: creating src/ta_common/Makefile
config.status: creating src/ta_func/Makefile
config.status: creating src/tools/Makefile
config.status: creating src/tools/gen_code/Makefile
config.status: creating src/tools/ta_regtest/Makefile
config.status: creating ta-lib-config
config.status: creating ta-lib.spec
config.status: creating ta-lib.dpkg
config.status: creating include/ta_config.h
config.status: include/ta_config.h is unchanged
config.status: executing depfiles commands
bash-4.2$ make
Making all in src
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making all in ta_abstract
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
Making all in ta_common
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
Making all in ta_func
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making all in src/tools
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
Making all in gen_code
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make  gen_code
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make[3]: `gen_code' is up to date.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
cp gen_code ../../../bin
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
Making all in ta_regtest
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
bash-4.2$ sudo make install 
Making install in src
/bin/sh: line 17: cd: src: Not a directory
make: *** [install-recursive] Error 1 
trufanov-nok commented 2 years ago

Let's exclude influence of user privileges during installation process to test it. Try:

mkdir /home/sagemaker-user/cache/trading-strat/ta-lib-bin
./configure --prefix=/home/sagemaker-user/cache/trading-strat/ta-lib-bin
make
make install
ls /home/sagemaker-user/cache/trading-strat/ta-lib-bin
R-LP commented 2 years ago

hi @trufanov-nok, thanks for your help you command executed without error, but if i try to install ta-lib afterwards, still get some errors:

Error below:

Collecting TA-lib
  Using cached TA-Lib-0.4.22.tar.gz (268 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy
  Using cached numpy-1.21.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Building wheels for collected packages: TA-lib
  Building wheel for TA-lib (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/conda/bin/python3.7 /opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpz8_hb7se
       cwd: /tmp/pip-install-xawv0aw4/ta-lib_052d06a2de434dd68fef84255a6188e9
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/talib
  copying talib/__init__.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/abstract.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/deprecated.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/stream.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_abstract.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_data.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_func.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_pandas.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_polars.py -> build/lib.linux-x86_64-3.7/talib
  copying talib/test_stream.py -> build/lib.linux-x86_64-3.7/talib
  running build_ext
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/talib
  gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -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-gyhxohn1/overlay/lib/python3.7/site-packages/numpy/core/include -I/opt/conda/include/python3.7m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.7/talib/_ta_lib.o
  talib/_ta_lib.c:621:10: fatal error: ta-lib/ta_defs.h: No such file or directory
   #include "ta-lib/ta_defs.h"
            ^~~~~~~~~~~~~~~~~~
  compilation terminated.
  setup.py:79: UserWarning: Cannot find ta-lib library, installation may fail.
    warnings.warn('Cannot find ta-lib library, installation may fail.')
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  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
bash-4.2$ ./configure --prefix=/home/sagemaker-user/cache/trading-strat/ta-lib-bin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... no
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for ANSI C header files... (cached) yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working volatile... yes
checking for ptrdiff_t... yes
checking return type of signal handlers... void
checking for working strcoll... yes
checking for strftime... yes
checking for working strtod... yes
checking for vprintf... yes
checking for _doprnt... no
checking for floor... no
checking for isascii... yes
checking for localeconv... yes
checking for mblen... yes
checking for memmove... yes
checking for memset... yes
checking for modf... yes
checking for pow... no
checking for sqrt... no
checking for strcasecmp... yes
checking for strchr... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/ta_abstract/Makefile
config.status: creating src/ta_common/Makefile
config.status: creating src/ta_func/Makefile
config.status: creating src/tools/Makefile
config.status: creating src/tools/gen_code/Makefile
config.status: creating src/tools/ta_regtest/Makefile
config.status: creating ta-lib-config
config.status: creating ta-lib.spec
config.status: creating ta-lib.dpkg
config.status: creating include/ta_config.h
config.status: include/ta_config.h is unchanged
config.status: executing depfiles commands
bash-4.2$ make
Making all in src
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making all in ta_abstract
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
Making all in ta_common
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
Making all in ta_func
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making all in src/tools
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
Making all in gen_code
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make  gen_code
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make[3]: `gen_code' is up to date.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
cp gen_code ../../../bin
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
Making all in ta_regtest
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
bash-4.2$ make install
Making install in src
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making install in ta_abstract
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/" || /bin/mkdir -p "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/"
 /usr/bin/install -c -m 644 '../../include/ta_defs.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_defs.h'
 /usr/bin/install -c -m 644 '../../include/ta_libc.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_libc.h'
 /usr/bin/install -c -m 644 '../../include/ta_abstract.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_abstract.h'
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_abstract'
Making install in ta_common
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/" || /bin/mkdir -p "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/"
 /usr/bin/install -c -m 644 '../../include/ta_defs.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_defs.h'
 /usr/bin/install -c -m 644 '../../include/ta_libc.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_libc.h'
 /usr/bin/install -c -m 644 '../../include/ta_common.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_common.h'
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_common'
Making install in ta_func
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/" || /bin/mkdir -p "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib/"
 /usr/bin/install -c -m 644 '../../include/ta_defs.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_defs.h'
 /usr/bin/install -c -m 644 '../../include/ta_libc.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_libc.h'
 /usr/bin/install -c -m 644 '../../include/ta_func.h' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include/ta-lib//ta_func.h'
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/ta_func'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
test -z "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib" || /bin/mkdir -p "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib"
 /bin/sh ../libtool --mode=install /usr/bin/install -c  'libta_lib.la' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.la'
/usr/bin/install -c .libs/libta_lib.so.0.0.0 /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.so.0.0.0
(cd /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib && { ln -s -f libta_lib.so.0.0.0 libta_lib.so.0 || { rm -f libta_lib.so.0 && ln -s libta_lib.so.0.0.0 libta_lib.so.0; }; })
(cd /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib && { ln -s -f libta_lib.so.0.0.0 libta_lib.so || { rm -f libta_lib.so && ln -s libta_lib.so.0.0.0 libta_lib.so; }; })
/usr/bin/install -c .libs/libta_lib.lai /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.la
/usr/bin/install -c .libs/libta_lib.a /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.a
chmod 644 /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.a
ranlib /home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib/libta_lib.a
libtool: install: warning: remember to run `libtool --finish /usr/lib'
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src'
Making install in src/tools
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
Making install in gen_code
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make  gen_code
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make[3]: `gen_code' is up to date.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
cp gen_code ../../../bin
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/gen_code'
Making install in ta_regtest
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools/ta_regtest'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[3]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib/src/tools'
make[1]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
make[2]: Entering directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
test -z "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/bin" || /bin/mkdir -p "/home/sagemaker-user/cache/trading-strat/ta-lib-bin/bin"
 /usr/bin/install -c 'ta-lib-config' '/home/sagemaker-user/cache/trading-strat/ta-lib-bin/bin/ta-lib-config'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
make[1]: Leaving directory `/home/sagemaker-user/cache/trading-strat/ta-lib'
bash-4.2$ ls /home/sagemaker-user/cache/trading-strat/ta-lib-bin
bin  include  lib
trufanov-nok commented 2 years ago

If installation into the user created folder is fine then the problem was with your user account permissions on a webserver.
When you're installing the python wrapper for ta-lib its setup script tries to compile the wrapper across ta-lib library installed in the system. But it can't find it in default folders.

You may either try to resolve permissions issue and make install ta-lib into the right system folder. Or keep it in user created folder and instruct the wrapper that it must look for a ta-lib library in another place. I would recommend second approach. I guess the wrapper's search paths should be configurable via TA_INCLUDE_PATH and TA_LIBRARY_PATH environment variables. So you shall try something like:

export TA_INCLUDE_PATH=/home/sagemaker-user/cache/trading-strat/ta-lib-bin/include
export TA_LIBRARY_PATH=/home/sagemaker-user/cache/trading-strat/ta-lib-bin/lib
pip install ta-lib
R-LP commented 2 years ago

It worked like a charm! Thank you so much sir !

milansoliya4210 commented 1 year ago

Hi can you give full list of command to install talib in sagemaker ??