我尝试了一些替代方法,但是发送
时,无法在ubuntu上安装ta-lib或使用make。pip install ta-Lib
Collecting ta-Lib
Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
Requirement already satisfied: numpy in ./miniconda3/lib/python3.6/site-packages (from ta-Lib) (1.15.0)
Building wheels for collected packages: ta-Lib
Running setup.py bdist_wheel for ta-Lib ... error
Complete output from command /home/user/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ugk06wz4/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 /tmp/pip-wheel-v2gctt6z --python-tag cp36:
/tmp/pip-install-ugk06wz4/ta-Lib/setup.py:79: 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.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/talib
copying talib/stream.py -> build/lib.linux-x86_64-3.6/talib
copying talib/deprecated.py -> build/lib.linux-x86_64-3.6/talib
copying talib/abstract.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_stream.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_abstract.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_data.py -> build/lib.linux-x86_64-3.6/talib
copying talib/__init__.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_pandas.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_func.py -> build/lib.linux-x86_64-3.6/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/talib
gcc -pthread -B /home/user/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/miniconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/home/user/miniconda3/include/python3.6m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.6/talib/_ta_lib.o
talib/_ta_lib.c:526:10: fatal error: ta-lib/ta_defs.h: No such file or directory
#include "ta-lib/ta_defs.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' 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 /home/user/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ugk06wz4/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 /tmp/pip-record-kipfzx36/install-record.txt --single-version-externally-managed --compile:
/tmp/pip-install-ugk06wz4/ta-Lib/setup.py:79: 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.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/talib
copying talib/stream.py -> build/lib.linux-x86_64-3.6/talib
copying talib/deprecated.py -> build/lib.linux-x86_64-3.6/talib
copying talib/abstract.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_stream.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_abstract.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_data.py -> build/lib.linux-x86_64-3.6/talib
copying talib/__init__.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_pandas.py -> build/lib.linux-x86_64-3.6/talib
copying talib/test_func.py -> build/lib.linux-x86_64-3.6/talib
running build_ext
building 'talib._ta_lib' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/talib
gcc -pthread -B /home/user/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/miniconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/home/user/miniconda3/include/python3.6m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.6/talib/_ta_lib.o
talib/_ta_lib.c:526:10: fatal error: ta-lib/ta_defs.h: No such file or directory
#include "ta-lib/ta_defs.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
,最后以红色显示 命令
/ home / user / miniconda3 / bin / python -u -c“导入setuptools, 标记化; 文件 ='/ tmp / pip-install-ugk06wz4 / ta-Lib / setup.py'; f = getattr(标记化, '打开',打开)(文件);代码= f.read()。replace('\ r \ n', '\ n'); f.close(); exec(compile(code, file ,'exec')))“安装 --record /tmp/pip-record-kipfzx36/install-record.txt-“单一版本-外部管理-编译”失败,错误代码为/ tmp / pip-install-ugk06wz4 / ta-Lib / < / p>
当我键入
make
要么
sudo make install
我得到这个:
make:***没有使目标“安装”的规则。停止。
我在做什么错? 在此先感谢您的好意
答案 0 :(得分:0)
sudo pip install -U setuptools
或者引用他的评论无效:
Try this 'sudo -H pip install TA-Lib'