gpt4 book ai didi

python -/usr/bin/clang 命令在 MacOS 上尝试 pip 安装 TA-lib 失败

转载 作者:太空宇宙 更新时间:2023-11-04 00:33:59 24 4
gpt4 key购买 nike

我正在尝试 pip install TA-lib 并获取此日志:

> pip install TA-lib
Collecting TA-lib
Downloading TA-Lib-0.4.10.tar.gz (829kB)
100% |████████████████████████████████| 839kB 822kB/s
Building wheels for collected packages: TA-lib
Running setup.py bdist_wheel for TA-lib ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/TA-lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpSTzWMxpip-wheel- --python-tag cp27:
/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/TA-lib/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.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/talib
copying talib/__init__.py -> build/lib.macosx-10.6-intel-2.7/talib
copying talib/deprecated.py -> build/lib.macosx-10.6-intel-2.7/talib
copying talib/test_abstract.py -> build/lib.macosx-10.6-intel-2.7/talib
copying talib/test_data.py -> build/lib.macosx-10.6-intel-2.7/talib
copying talib/test_func.py -> build/lib.macosx-10.6-intel-2.7/talib
copying talib/test_stream.py -> build/lib.macosx-10.6-intel-2.7/talib
running build_ext
building 'talib.common' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/talib
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c talib/common.c -o build/temp.macosx-10.6-intel-2.7/talib/common.o
talib/common.c:242: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 status 1

----------------------------------------

> 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
> Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
> -u -c "import setuptools, tokenize;__file__='/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/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 /var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-lbZkZA-record/install-record.txt
> --single-version-externally-managed --compile:
> /private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/TA-lib/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.6-intel-2.7
> creating build/lib.macosx-10.6-intel-2.7/talib
> copying talib/__init__.py -> build/lib.macosx-10.6-intel-2.7/talib
> copying talib/deprecated.py -> build/lib.macosx-10.6-intel-2.7/talib
> copying talib/test_abstract.py -> build/lib.macosx-10.6-intel-2.7/talib
> copying talib/test_data.py -> build/lib.macosx-10.6-intel-2.7/talib
> copying talib/test_func.py -> build/lib.macosx-10.6-intel-2.7/talib
> copying talib/test_stream.py -> build/lib.macosx-10.6-intel-2.7/talib
> running build_ext
> building 'talib.common' extension
> creating build/temp.macosx-10.6-intel-2.7
> creating build/temp.macosx-10.6-intel-2.7/talib
> /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
> -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
> -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c talib/common.c -o build/temp.macosx-10.6-intel-2.7/talib/common.o
> talib/common.c:242: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 status 1
>
> ---------------------------------------- Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
> -u -c "import setuptools, tokenize;__file__='/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/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 /var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-lbZkZA-record/install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in
> /private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/pip-build-z2UL44/TA-lib/

我对安装东西一窍不通。这里有一些指导:

https://pypi.python.org/pypi/TA-Lib

但它是针对python3的,我没有这种故障排除的经验

最佳答案

请尝试:

brew install ta-lib
pip install numpy
pip install TA-lib

信息来源: https://github.com/mrjbq7/ta-lib

关于python -/usr/bin/clang 命令在 MacOS 上尝试 pip 安装 TA-lib 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44895285/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com