Closed anoncardano closed 2 years ago
The README has instructions for installing the TA-Lib dependency on macOS.
On Mar 29, 2022, at 12:57 PM, anoncardano @.***> wrote:
(base) @.*** ~ % pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.24.tar.gz (269 kB) Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.9/site-packages (from ta-lib) (1.20.3) Building wheels for collected packages: ta-lib Building wheel for ta-lib (setup.py) ... error ERROR: Command errored out with exit status 1: command: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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'"'"'))' bdist_wheel -d /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-wheel-98xgkpbp cwd: /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/ Complete output (29 lines): /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.9 creating build/lib.macosx-10.9-x86_64-3.9/talib copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_polars.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/init.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib running build_ext skipping 'talib/_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -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/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.9 -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.9/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
include "ta-lib/ta_defs.h"
^
~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1ERROR: Failed building wheel for ta-lib Running setup.py clean for ta-lib Failed to build ta-lib Installing collected packages: ta-lib Running setup.py install for ta-lib ... error ERROR: Command errored out with exit status 1: command: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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 /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-record-_puu39j1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.9/ta-lib cwd: /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/ Complete output (29 lines): /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py:77: 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.9 creating build/lib.macosx-10.9-x86_64-3.9/talib copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_polars.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/init.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib running build_ext skipping 'talib/_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -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/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.9 -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.9/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
include "ta-lib/ta_defs.h"
^
~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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 /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-record-_puu39j1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.9/ta-lib Check the logs for full command output.
Trying to install and this is all I get, if anyone has got any potential fixes that would be great! :)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
ive tried with no success, there is just error after error. I've been trying to 2 solid days with nothing to show for it
1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> ta-lib
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure
the failure is - subprocess-exited-with-error
@anoncardano which exactly commands did you execute to install ta-lib?
python3 -m pip install ta-lib brew install ta-lib pip3 install ta-lib
all errors
Is your homebrew x86 or ARM64?
(Is it under /usr or /opt)?
Is your Python x86 or ARM64?
On Wed, Mar 30, 2022 at 12:46 PM anoncardano @.***> wrote:
python3 -m pip install ta-lib brew install ta-lib pip3 install ta-lib
all errors
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/509#issuecomment-1083555134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5AYFCUIVROAF7GKJH23VCSVP3ANCNFSM5R7PZRCA . You are receiving this because you commented.Message ID: @.***>
how do I check?
I downloaded the latest version off the python website, that's all I know
homebrew is ARM64
they're both ARM64
Try
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
pip3 install ta-lib
instead of pip3 install ta-lib
if not work, what does brew --prefix ta-lib
says?
And what the result of brew install ta-lib
?
isaas@IS ~ % export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include" Error: No available formula with the name "ta-lib".
isaas@IS ~ % export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib" Error: No available formula with the name "ta-lib".
isaas@IS ~ % brew --prefix ta-lib Error: No available formula with the name "ta-lib".
isaas@IS ~ % brew install ta-lib fatal: Could not resolve HEAD to a revision Warning: No available formula with the name "ta-lib". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.
One of the other common problems is “pip3” not being correct.
So I recommend:
python3 -m pip install ta-lib
On Mar 30, 2022, at 1:05 PM, Alexander Trufanov @.***> wrote:
Try
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include" export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib" pip3 install ta-lib instead of pip3 install ta-lib if not work, what does brew --prefix ta-lib says? And what the result of brew install ta-lib?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Looks like you have an issue with HomeBrew.
Did you reinstall it when you got your new M1?
Try reinstalling
Does arch -arm64 brew install ta-lib
work?
ive reinstalled it, no change
isaas@IS ~ % arch -arm64 brew install ta-lib Warning: No available formula with the name "ta-lib". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.
tried python3 -m pip install ta-lib again and its just an error:
isaas@IS ~ % python3 -m pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.24.tar.gz (269 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from ta-lib) (1.22.3) 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: subprocess-exited-with-error
× Running setup.py install for ta-lib did not run successfully. │ exit code: 1 ╰─> [28 lines of output] /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-t2f4iws8/ta-lib_fbe0fcf1275b4f48994efab53c94f192/setup.py:77: 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-universal2-3.10 creating build/lib.macosx-10.9-universal2-3.10/talib copying talib/abstract.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_polars.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/deprecated.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/init.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/stream.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_data.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_func.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_stream.py -> build/lib.macosx-10.9-universal2-3.10/talib running build_ext building 'talib._ta_lib' extension creating build/temp.macosx-10.9-universal2-3.10 creating build/temp.macosx-10.9-universal2-3.10/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -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/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c talib/_ta_lib.c -o build/temp.macosx-10.9-universal2-3.10/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
^~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> ta-lib
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
am I missing something here? there's got to be something missing, im looking at every tutorial and it just doesn't work for me its strange
what does brew
point to?
$ which brew
/opt/homebrew/bin/brew
Is there any chance you have stuff in /usr/local
previous brew installations conflicting?
isaas@IS ~ % which brew /opt/homebrew/bin/brew
isaas@IS ~ % cd /usr/local isaas@IS local % ls bin isaas@IS local % cd bin isaas@IS bin % ls 2to3 pip3.10 python3-intel64 2to3-3.10 pydoc3 python3.10 idle3 pydoc3.10 python3.10-config idle3.10 python3 python3.10-intel64 pip3 python3-config
I assume you've checked brew doctor
and other ways of confirming your homebrew works like brew config
?
It's bizarre that you got a HEAD revision error and also ta-lib
not found...
isaas@IS bin % brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Homebrew/homebrew-core was not tapped properly! Run: rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core" brew tap homebrew/core
Warning: "config" scripts exist outside your system or Homebrew directories.
./configure
scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew-provided script of the same name. We found the following "config" scripts: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10-config /Library/Frameworks/Python.framework/Versions/3.10/bin/python3-config
Warning: Some taps are not on the default git origin branch and may not receive updates. If this is a surprise to you, check out the default branch with: git -C $(brew --repo homebrew/core) checkout master
isaas@IS bin % cd ../.. isaas@IS /usr % cd .. isaas@IS / % git -C $(brew --repo homebrew/core) checkout master Branch 'master' set up to track remote branch 'master' from 'origin'. Already on 'master'
isaas@IS / % rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core" brew tap homebrew/core ==> Tapping homebrew/core Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-core'... remote: Enumerating objects: 1167373, done. remote: Counting objects: 100% (6/6), done. remote: Compressing objects: 100% (4/4), done. remote: Total 1167373 (delta 2), reused 6 (delta 2), pack-reused 1167367 Receiving objects: 100% (1167373/1167373), 469.21 MiB | 6.96 MiB/s, done. Resolving deltas: 100% (807525/807525), done. Tapped 3 commands and 6016 formulae (6,353 files, 514.6MB).
isaas@IS / % brew config HOMEBREW_VERSION: 3.4.4 ORIGIN: https://github.com/Homebrew/brew HEAD: 5f5af43244eaece1f09d695603e1a261676713a0 Last commit: 4 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 4ea9d032add7c66455d7f29d6e6fdfdcbd755b9d Core tap last commit: 43 minutes ago Core tap branch: master HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core HOMEBREW_MAKE_JOBS: 8 Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby CPU: octa-core 64-bit arm_firestorm_icestorm Clang: 13.1.6 build 1316 Git: 2.32.0 => /Library/Developer/CommandLineTools/usr/bin/git Curl: 7.79.1 => /usr/bin/curl macOS: 12.3-arm64 CLT: 13.3.0.0.1.1645755326 Xcode: N/A Rosetta 2: false
anything seem out of the ordinary?
That initial error with homebrew-core seems the root cause.
On Wed, Mar 30, 2022 at 1:51 PM anoncardano @.***> wrote:
anything seem out of the ordinary?
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/509#issuecomment-1083613267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A4MZU3SYQ3PXHPQYELVCS5DXANCNFSM5R7PZRCA . You are receiving this because you commented.Message ID: @.***>
how should I go about fixing it?
Didn't this fix it?
isaas@IS / % rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
==> Tapping homebrew/core
isaas@IS ~ % brew install ta-lib
==> Downloading https://ghcr.io/v2/homebrew/core/ta-lib/manifests/0.4.0-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ta-lib/blobs/sha256:42dab227ace
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring ta-lib--0.4.0.arm64_monterey.bottle.1.tar.gz
🍺 /opt/homebrew/Cellar/ta-lib/0.4.0: 14 files, 2.3MB
==> Running brew cleanup ta-lib
...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
Right, that's successful.
So follow the instructions and your ta-lib should work.
do you have a crypto address or anything? need to send you something, your help is appreciated man
Nope, no donations requested. If you have feedback after using TA-Lib or anything that we can do to better our software let me know. Sorry your homebrew issue was confusing, that's not an error I've seen before.
I will, thank you so much for your help. Yeah it certainly was something!
Good point, fixed in 76763a43cc970b4d78dfe73e5308b76b9f645d8f
On Wed, Mar 30, 2022 at 2:33 PM Alexander Trufanov @.***> wrote:
@mrjbq7 https://github.com/mrjbq7, btw, regarding the readme:
Mac OS X $ brew install ta-lib If you are using a M1 laptop and Homebrew, then you can set these before installing:
$ export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include" $ export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib" $ arch -arm64 brew install ta-lib You might also find this helpful on M1, particularly if you have tried several different installations without success:
$ your-arm64-python -m pip install --no-cache-dir ta-lib
I;m not a mac user, but shouldn't the export stuff be before the pip install instead of brew install ?
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/509#issuecomment-1083646047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5AZNK7GOS6F2T22NCRLVCTCCBANCNFSM5R7PZRCA . You are receiving this because you were mentioned.Message ID: @.***>
Obviously your brew isn't working right.
$ brew search ta-lib ==> Formulae ta-lib ✔ taglib tdlib t1lib
On Wed, Mar 30, 2022 at 1:28 PM anoncardano @.***> wrote:
ive reinstalled it, no change
@.*** ~ % arch -arm64 brew install ta-lib Warning: No available formula with the name "ta-lib". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.
tried python3 -m pip install ta-lib again and its just an error:
@.*** ~ % python3 -m pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.24.tar.gz (269 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from ta-lib) (1.22.3) 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: subprocess-exited-with-error
× Running setup.py install for ta-lib did not run successfully. │ exit code: 1 ╰─> [28 lines of output] /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-t2f4iws8/ta-lib_fbe0fcf1275b4f48994efab53c94f192/setup.py:77: 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-universal2-3.10 creating build/lib.macosx-10.9-universal2-3.10/talib copying talib/abstract.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_polars.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/deprecated.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/init.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/stream.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_data.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_func.py -> build/lib.macosx-10.9-universal2-3.10/talib copying talib/test_stream.py -> build/lib.macosx-10.9-universal2-3.10/talib running build_ext building 'talib._ta_lib' extension creating build/temp.macosx-10.9-universal2-3.10 creating build/temp.macosx-10.9-universal2-3.10/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -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/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c talib/_ta_lib.c -o build/temp.macosx-10.9-universal2-3.10/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
include "ta-lib/ta_defs.h"
^
~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output]note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> ta-lib
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/509#issuecomment-1083592716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5AZFUHLVQFGCA6XYPX3VCS2NBANCNFSM5R7PZRCA . You are receiving this because you commented.Message ID: @.***>
You need to make sure your architectures match between python and brew install ta-lib. That’s the most common error.
If you want to post your error we could help.
On Mar 30, 2022, at 12:30 PM, anoncardano @.***> wrote:
ive tried with no success, there is just error after error. I've been trying to 2 solid days with nothing to show for it
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Had the same problem and try harded for roundabout 3 hours. In the end i had to install brew for m-chips https://stackoverflow.com/questions/66666134/how-to-install-homebrew-on-m1-mac and uninstall the other brew under /usr/local with the commands
/usr/local/bin/brew list | xargs /usr/local/bin/brew uninstall --force
&
/usr/local/bin/brew install --force /usr/local/bin/brew cleanup --force sudo rm -rf /usr/local/Homebrew sudo rm -rf /usr/local/Caskroom sudo rm -rf /usr/local/Cellar sudo rm -rf /usr/local/var/homebrew sudo rm -rf /usr/local/etc/bash_completion.d sudo rm -rf /usr/local/lib/pkgconfig sudo rm -rf /usr/local/opt sudo rm -rf /usr/local/share/doc/homebrew sudo rm -rf /usr/local/share/man/man1/brew.1 sudo rm -rf /usr/local/share/man/man1/brew-cask.1 sudo rm -rf /usr/local/share/zsh/site-functions/_brew sudo rm -rf /usr/local/share/zsh/site-functions/_brew_cask sudo rm -rf /usr/local/share/zsh/site-functions/_brew_cask sudo rm -rf /usr/local/bin/brew sudo rm -rf /usr/local/bin/brew-cask
after that python3 -m pip install --no-cache-dir ta-lib did it for me
This is all I get when trying to install ta-lib
(base) isas@IS ~ % pip install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.24.tar.gz (269 kB) Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.9/site-packages (from ta-lib) (1.20.3) Building wheels for collected packages: ta-lib Building wheel for ta-lib (setup.py) ... error ERROR: Command errored out with exit status 1: command: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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'"'"'))' bdist_wheel -d /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-wheel-98xgkpbp cwd: /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/ Complete output (29 lines): /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.9 creating build/lib.macosx-10.9-x86_64-3.9/talib copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_polars.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/init.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib running build_ext skipping 'talib/_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -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/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.9 -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.9/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
include "ta-lib/ta_defs.h"
1 error generated. error: command '/usr/bin/clang' failed with exit code 1
ERROR: Failed building wheel for ta-lib Running setup.py clean for ta-lib Failed to build ta-lib Installing collected packages: ta-lib Running setup.py install for ta-lib ... error ERROR: Command errored out with exit status 1: command: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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 /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-record-_puu39j1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.9/ta-lib cwd: /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/ Complete output (29 lines): /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py:77: 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.9 creating build/lib.macosx-10.9-x86_64-3.9/talib copying talib/abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_polars.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_abstract.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/deprecated.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/init.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_pandas.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_data.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_func.py -> build/lib.macosx-10.9-x86_64-3.9/talib copying talib/test_stream.py -> build/lib.macosx-10.9-x86_64-3.9/talib running build_ext skipping 'talib/_ta_lib.c' Cython extension (up-to-date) building 'talib._ta_lib' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/talib clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -fPIC -O2 -isystem /opt/anaconda3/include -arch x86_64 -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/opt/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.9 -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.9/talib/_ta_lib.o talib/_ta_lib.c:682:10: fatal error: 'ta-lib/ta_defs.h' file not found
include "ta-lib/ta_defs.h"
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/setup.py'"'"'; file='"'"'/private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-install-sae_0fco/ta-lib_160490568a80485794047bd0c057317b/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 /private/var/folders/9r/szfrg70x6nqg780rsbd9k9v40000gn/T/pip-record-_puu39j1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.9/ta-lib Check the logs for full command output.
Trying to install and this is all I get, if anyone has got any potential fixes that would be great! :)