安装TA-Lib时报错:ubuntu****, Command "/usr/bin/python -u -c "import setuptools, tokenize;__file
Posted angener
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装TA-Lib时报错:ubuntu****, Command "/usr/bin/python -u -c "import setuptools, tokenize;__file相关的知识,希望对你有一定的参考价值。
使用pip install TA-Lib 时报错:
ERROR: Complete output from command /usr/bin/python3 -u -c ‘import setuptools, tokenize;__file__=‘"‘"‘/tmp/pip-install-afeznd8w/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-q0lugo3l --python-tag cp35: ERROR: /tmp/pip-install-afeznd8w/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.5 creating build/lib.linux-x86_64-3.5/talib copying talib/test_data.py -> build/lib.linux-x86_64-3.5/talib copying talib/test_func.py -> build/lib.linux-x86_64-3.5/talib copying talib/abstract.py -> build/lib.linux-x86_64-3.5/talib copying talib/test_abstract.py -> build/lib.linux-x86_64-3.5/talib copying talib/test_stream.py -> build/lib.linux-x86_64-3.5/talib copying talib/__init__.py -> build/lib.linux-x86_64-3.5/talib copying talib/stream.py -> build/lib.linux-x86_64-3.5/talib copying talib/deprecated.py -> build/lib.linux-x86_64-3.5/talib copying talib/test_pandas.py -> build/lib.linux-x86_64-3.5/talib running build_ext building ‘talib._ta_lib‘ extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/talib x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/include/python3.5m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.5/talib/_ta_lib.o talib/_ta_lib.c:526:28: fatal error: ta-lib/ta_defs.h: 没有那个文件或目录 compilation terminated. error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for TA-Lib
解决方案:
-
sudo apt-get install libssl-dev libffi-dev python-dev build-essential libxml2-dev libxslt1-dev
-
sudo pip install TA-Lib
以上是关于安装TA-Lib时报错:ubuntu****, Command "/usr/bin/python -u -c "import setuptools, tokenize;__file的主要内容,如果未能解决你的问题,请参考以下文章
ubuntu下安装nodejs时报错make: *** [install] 错误 1谁能帮忙看一下
Ubuntu 16.04安装QtCharts时报错:'qtConfig' is not a recognized test function.
ubuntu中执行可执行文件时报错“没有那个文件或目录”的解决办法(非权限问题)
ubuntu下安装tomcat,shutdown时报错:./catalina.sh:1:eval:/home/xxx/jdk/jre/bin/java:not found
ubuntu 14.04 中想要使用sogou输入法,但是安装完fcitx后运行fcitx-config-gtk3配置输入法时报错了。