Python Forum
TA-Lib pip install not working Mac (Fix Found)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TA-Lib pip install not working Mac (Fix Found)
#1
Whats up everyone, hoping someone has an ideas as I have tried everything I can find to make this work.

Running iOS BigSur with Python 3.9.1 64bit.

Ran brew install ta-lib - worked
Ran on ENV pip install TA-Lib (BIG ASS RED ERROR)
tried on system pip3 install TA-Lib (Big ASS RED ERROR)
update: I tried installing with Python 3.7.9 and this also does not work

Error starts with- ERROR: Command errored out with exit status 1: and runs 30 to 40 lines.

Does any of you have a fix for this? Is it the Python version I am running or a 32vs64 bit issue?

Mentioned this bellow, but here is the fix for anyone in the future:

I found the solution!!!! Finally

1) brew install ta-lib
2) xcode-select --install
3) pip3 install TA-Lib
3-1) if you have multiple version of python on your system (i.e, 3.7 and 3.9) you must specify the version you want. For instance pip3.7 install TA-Lib or pip3.9. etc
-- if you just use pip3 install, it will use the lower version of python installed, than other modules may need to be specified at that module. For example, I used pip3 install TA-Lib(which worked), but than when I installed flask(as I have 3.7 and 3.9) Flask kept failing until I specified pip3.9 install ta-Lib and pip3.9 install flask. worked also with pip3 install TA-Lib and pip3.7 install Flask.

It is best to just identify both off the bat with the specific version of python you are using: pip3.7 or pip 3.9 install WhateverYouAreInstalling
Reply
#2
Can you show the error? "exit status 1" doesn't mean anything by itself.
Reply
#3
(Jan-14-2021, 10:51 PM)bowlofred Wrote: Can you show the error? "exit status 1" doesn't mean anything by itself.

ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-install-aysiu8ei/TA-Lib/setup.py'"'"'; __file__='"'"'/private/var/folders/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-install-aysiu8ei/TA-Lib/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/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-record-s9dxej5t/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/TA-Lib
cwd: /private/var/folders/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-install-aysiu8ei/TA-Lib/
Complete output (22 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.7/talib
copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.7/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/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/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.7/talib/_ta_lib.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-install-aysiu8ei/TA-Lib/setup.py'"'"'; __file__='"'"'/private/var/folders/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-install-aysiu8ei/TA-Lib/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/1r/zf6cc3ds5rxbp5_n67z4nks80000gn/T/pip-record-s9dxej5t/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/TA-Lib Check the logs for full command output.
Reply
#4
I found the solution!!!! Finally

1) brew install ta-lib
2) xcode-select --install
3) pip3 install TA-Lib
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  My minoconda3 install is not working. Led_Zeppelin 1 1,462 Jan-26-2022, 09:49 PM
Last Post: snippsat
  install.bat pymem not working? ChickenNugget 1 1,788 Oct-31-2021, 02:04 PM
Last Post: snippsat
  Pip install for mysqlclient not working burvil 4 50,622 Feb-04-2021, 08:16 PM
Last Post: nilamo
  How can I found how many numbers are there in a Collatz Sequence that I found? cananb 2 2,500 Nov-23-2020, 05:15 PM
Last Post: cananb
  cannot install electrum on raspbeerypi, due to PyQt5 not found. rik 1 2,595 May-19-2019, 01:10 PM
Last Post: rik
  trying to locate a working grpc to install MrMajorThorburn 6 4,903 May-10-2019, 01:19 PM
Last Post: MrMajorThorburn
  import keyboard module doesn't get found - working on laptop but no on raspberry pi.. HANSJORG2 1 8,110 Mar-16-2018, 02:48 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020