Skip to content

pip installation error with python 3.8 #381

@ShaneZhong

Description

@ShaneZhong

I ran the pip install TA-Lib with the following error message:

  Downloading TA-Lib-0.4.19.tar.gz (267 kB)
     |████████████████████████████████| 267 kB 3.9 MB/s eta 0:00:01
Requirement already satisfied: numpy in /Users/shane/Documents/Github/venv/investbetter/lib/python3.8/site-packages (from TA-Lib) (1.19.4)
Using legacy 'setup.py install' for TA-Lib, since package 'wheel' is not installed.
Installing collected packages: TA-Lib
    Running setup.py install for TA-Lib ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/shane/Documents/Github/venv/investbetter/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/setup.py'"'"'; __file__='"'"'/private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-record-fqr76o9e/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shane/Documents/Github/venv/investbetter/include/site/python3.8/TA-Lib
         cwd: /private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/
    Complete output (27 lines):
    /private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
      warnings.warn('Cannot find ta-lib library, installation may fail.')
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.8/talib
    running build_ext
    building 'talib._ta_lib' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/talib
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/Users/shane/Documents/Github/venv/investbetter/lib/python3.8/site-packages/numpy/core/include -I/Users/shane/Documents/Github/venv/investbetter/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.8/talib/_ta_lib.o
    talib/_ta_lib.c:611:10: fatal error: 'ta-lib/ta_defs.h' file not found
    #include "ta-lib/ta_defs.h"
             ^~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/shane/Documents/Github/venv/investbetter/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/setup.py'"'"'; __file__='"'"'/private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-install-1wnbpury/ta-lib_8357d3691087478086eb8b20c8bab6a8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/jd/rb3st7qn6nvgln2nd0sy2j0c0000gn/T/pip-record-fqr76o9e/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shane/Documents/Github/venv/investbetter/include/site/python3.8/TA-Lib Check the logs for full command output.```

Any suggestions would be much appreciated! 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions