当前位置: 首页 > news >正文

付费网站推广如何推广网站方法

付费网站推广,如何推广网站方法,网站托管,wordpress 不显示全文Linux下TA_Lib安装失败的问题处理 TA_Lib是python的量化指标库,其中包含了很多150多种量化指标 ,量化分析中经常使用。 This is a Python wrapper for TA-LIB based on Cython instead of SWIG. From the homepage: TA-Lib is widely used by trading …

Linux下TA_Lib安装失败的问题处理

TA_Lib是python的量化指标库,其中包含了很多150多种量化指标 ,量化分析中经常使用。

  • This is a Python wrapper for TA-LIB based on Cython instead of SWIG.
    From the homepage:

  • TA-Lib is widely used by trading software developers requiring to
    perform technical analysis of financial market data.

  • Includes 150+ indicators such as ADX, MACD, RSI, Stochastic, Bollinger
    Bands, etc. Candlestick pattern recognition Open-source API for C/C++,
    Java, Perl, Python and 100% Managed .NET

1.环境

在Linux下用的conda
Python 的版本是V3.8

# python -V
Python 3.8.13

conda的版本V4.5.11

# conda infoactive environment : nlpactive env location : /root/anaconda3/envs/nlpshell level : 2user config file : /root/.condarcpopulated config files : /root/.condarcconda version : 4.5.11conda-build version : 3.15.1python version : 3.7.0.final.0base environment : /root/anaconda3  (writable)channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarchhttps://repo.anaconda.com/pkgs/main/linux-64https://repo.anaconda.com/pkgs/main/noarchhttps://repo.anaconda.com/pkgs/free/linux-64https://repo.anaconda.com/pkgs/free/noarchhttps://repo.anaconda.com/pkgs/r/linux-64https://repo.anaconda.com/pkgs/r/noarchhttps://repo.anaconda.com/pkgs/pro/linux-64https://repo.anaconda.com/pkgs/pro/noarchpackage cache : /root/anaconda3/pkgs/root/.conda/pkgsenvs directories : /root/anaconda3/envs/root/.conda/envsplatform : linux-64user-agent : conda/4.5.11 requests/2.28.2 CPython/3.7.0 Linux/3.10.0-327.el7.x86_64 centos/7 glibc/2.17UID:GID : 0:0netrc file : Noneoffline mode : False

2.错误信息

直接用pip安装

# pip install TA_Lib
Looking in indexes: https://pypi.douban.com/simple/
Collecting TA_LibDownloading https://pypi.doubanio.com/packages/39/6f/6acaee2eac6afb2cc6a2adcb294080577f9983fbd2726395b9047c4e13ec/TA-Lib-0.4.26.tar.gz (272 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 272.6/272.6 kB 972.6 kB/s eta 0:00:00Installing build dependencies ... doneGetting requirements to build wheel ... doneInstalling backend dependencies ... donePreparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in ./anaconda3/envs/nlp/lib/python3.8/site-packages (from TA_Lib) (1.23.5)
Building wheels for collected packages: TA_LibBuilding wheel for TA_Lib (pyproject.toml) ... errorerror: subprocess-exited-with-error× Building wheel for TA_Lib (pyproject.toml) did not run successfully.│ exit code: 1╰─> [27 lines of output]running bdist_wheelrunning buildrunning build_pycreating buildcreating build/lib.linux-x86_64-cpython-38creating build/lib.linux-x86_64-cpython-38/talibcopying talib/__init__.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/abstract.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/deprecated.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/stream.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_abstract.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_data.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_func.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_pandas.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_polars.py -> build/lib.linux-x86_64-cpython-38/talibcopying talib/test_stream.py -> build/lib.linux-x86_64-cpython-38/talibrunning build_extbuilding 'talib._ta_lib' extensioncreating build/temp.linux-x86_64-cpython-38creating build/temp.linux-x86_64-cpython-38/talibgcc -pthread -B /root/anaconda3/envs/nlp/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -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/tmp/pip-build-env-lmazfngv/normal/lib/python3.8/site-packages/numpy/core/include -I/root/anaconda3/envs/nlp/include/python3.8 -c talib/_ta_lib.c -o build/temp.linux-x86_64-cpython-38/talib/_ta_lib.otalib/_ta_lib.c:747:28: fatal error: ta-lib/ta_defs.h: No such file or directory#include "ta-lib/ta_defs.h"^compilation terminated.<string>:77: UserWarning: Cannot find ta-lib library, installation may fail.error: command '/usr/bin/gcc' failed with exit code 1[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for TA_Lib
Failed to build TA_Lib
ERROR: Could not build wheels for TA_Lib, which is required to install pyproject.toml-based projects

github介绍TA-Lib
TA-Lib中包含的原始Python绑定使用SWIG,不幸的是,SWIG很难安装,而且效率也不如预期。

按推荐的安装方法用:

conda install -c conda-forge ta-lib

安装成功,效果如下:

 conda install -c conda-forge ta-lib
Solving environment: done==> WARNING: A newer version of conda exists. <==current version: 4.5.11latest version: 23.7.2Please update conda by running$ conda update -n base -c defaults conda## Package Plan ##environment location: /root/anaconda3/envs/nlpadded / updated specs: - ta-libThe following packages will be downloaded:package                    |            build---------------------------|-----------------python_abi-3.8             |           2_cp38           4 KB  conda-forge_libgcc_mutex-0.1          |      conda_forge           3 KB  conda-forgelibta-lib-0.4.0            |       h166bdaf_1         517 KB  conda-forgelibuuid-2.32.1             |    h7f98852_1000          28 KB  conda-forgelibgfortran5-12.2.0        |      h337968e_19         1.8 MB  conda-forgebzip2-1.0.8                |       h7f98852_4         484 KB  conda-forge_openmp_mutex-4.5          |            2_gnu          23 KB  conda-forgelibgfortran-ng-12.2.0      |      h69a702a_19          22 KB  conda-forgelibblas-3.9.0              |16_linux64_openblas          13 KB  conda-forgelibzlib-1.2.12             |       h166bdaf_2          63 KB  conda-forgelibnsl-2.0.0               |       h7f98852_0          31 KB  conda-forgeliblapack-3.9.0            |16_linux64_openblas          13 KB  conda-forgelibgcc-ng-12.2.0           |      h65d4601_19         931 KB  conda-forgelibffi-3.4.2               |       h7f98852_5          57 KB  conda-forgelibgomp-12.2.0             |      h65d4601_19         455 KB  conda-forgeopenssl-3.0.7              |       h166bdaf_0         2.8 MB  conda-forgeta-lib-0.4.19              |   py38h71d37f0_4         398 KB  conda-forgeca-certificates-2022.9.24  |       ha878542_0         150 KB  conda-forgelibopenblas-0.3.21         |pthreads_h78a6416_3        10.1 MB  conda-forgepython-3.8.13              |ha86cf86_0_cpython        25.2 MB  conda-forgenumpy-1.21.4               |   py38he2449b9_0         6.2 MB  conda-forgelibcblas-3.9.0             |16_linux64_openblas          13 KB  conda-forge------------------------------------------------------------Total:        49.2 MBThe following NEW packages will be INSTALLED:_openmp_mutex:   4.5-2_gnu                  conda-forgebzip2:           1.0.8-h7f98852_4           conda-forgelibblas:         3.9.0-16_linux64_openblas  conda-forgelibcblas:        3.9.0-16_linux64_openblas  conda-forgelibgfortran-ng:  12.2.0-h69a702a_19         conda-forgelibgfortran5:    12.2.0-h337968e_19         conda-forgelibgomp:         12.2.0-h65d4601_19         conda-forgeliblapack:       3.9.0-16_linux64_openblas  conda-forgelibnsl:          2.0.0-h7f98852_0           conda-forgelibopenblas:     0.3.21-pthreads_h78a6416_3 conda-forgelibta-lib:       0.4.0-h166bdaf_1           conda-forgelibuuid:         2.32.1-h7f98852_1000       conda-forgelibzlib:         1.2.12-h166bdaf_2          conda-forgenumpy:           1.21.4-py38he2449b9_0      conda-forgepython_abi:      3.8-2_cp38                 conda-forgeta-lib:          0.4.19-py38h71d37f0_4      conda-forgeThe following packages will be UPDATED:_libgcc_mutex:   0.1-main                               --> 0.1-conda_forge           conda-forgelibffi:          3.3-he6710b0_2                         --> 3.4.2-h7f98852_5          conda-forgelibgcc-ng:       9.1.0-hdf63c60_0                       --> 12.2.0-h65d4601_19        conda-forgeopenssl:         1.1.1t-h7f8727e_0                      --> 3.0.7-h166bdaf_0          conda-forgepython:          3.8.13-h12debd9_0                      --> 3.8.13-ha86cf86_0_cpython conda-forgeThe following packages will be DOWNGRADED:ca-certificates: 2023.01.10-h06a4308_0                  --> 2022.9.24-ha878542_0      conda-forgeProceed ([y]/n)? yDownloading and Extracting Packages
python_abi-3.8       | 4 KB      | ######################################################################################### | 100% 
_libgcc_mutex-0.1    | 3 KB      | ######################################################################################### | 100% 
libta-lib-0.4.0      | 517 KB    | ######################################################################################### | 100% 
libuuid-2.32.1       | 28 KB     | ######################################################################################### | 100% 
libgfortran5-12.2.0  | 1.8 MB    | ######################################################################################### | 100% 
bzip2-1.0.8          | 484 KB    | ######################################################################################### | 100% 
_openmp_mutex-4.5    | 23 KB     | ######################################################################################### | 100% 
libgfortran-ng-12.2. | 22 KB     | ######################################################################################### | 100% 
libblas-3.9.0        | 13 KB     | ######################################################################################### | 100% 
libzlib-1.2.12       | 63 KB     | ######################################################################################### | 100% 
libnsl-2.0.0         | 31 KB     | ######################################################################################### | 100% 
liblapack-3.9.0      | 13 KB     | ######################################################################################### | 100% 
libgcc-ng-12.2.0     | 931 KB    | ######################################################################################### | 100% 
libffi-3.4.2         | 57 KB     | ######################################################################################### | 100% 
libgomp-12.2.0       | 455 KB    | ######################################################################################### | 100% 
openssl-3.0.7        | 2.8 MB    | ######################################################################################### | 100% 
ta-lib-0.4.19        | 398 KB    | ######################################################################################### | 100% 
ca-certificates-2022 | 150 KB    | ######################################################################################### | 100% 
libopenblas-0.3.21   | 10.1 MB   | ######################################################################################### | 100% 
python-3.8.13        | 25.2 MB   | ######################################################################################### | 100% 
numpy-1.21.4         | 6.2 MB    | ######################################################################################### | 100% 
libcblas-3.9.0       | 13 KB     | ######################################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

3.验证

查看talib 的方法函数:

import talib
#按组输入talib的方法,返回是字典
content=talib.get_function_groups()
#返回元组
for item in content.items():#遍历元组for k in item:print(k)

输出:

Cycle Indicators
['HT_DCPERIOD', 'HT_DCPHASE', 'HT_PHASOR', 'HT_SINE', 'HT_TRENDMODE']
Math Operators
['ADD', 'DIV', 'MAX', 'MAXINDEX', 'MIN', 'MININDEX', 'MINMAX', 'MINMAXINDEX', 'MULT', 'SUB', 'SUM']
Math Transform
['ACOS', 'ASIN', 'ATAN', 'CEIL', 'COS', 'COSH', 'EXP', 'FLOOR', 'LN', 'LOG10', 'SIN', 'SINH', 'SQRT', 'TAN', 'TANH']
Momentum Indicators
['ADX', 'ADXR', 'APO', 'AROON', 'AROONOSC', 'BOP', 'CCI', 'CMO', 'DX', 'MACD', 'MACDEXT', 'MACDFIX', 'MFI', 'MINUS_DI', 'MINUS_DM', 'MOM', 'PLUS_DI', 'PLUS_DM', 'PPO', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'RSI', 'STOCH', 'STOCHF', 'STOCHRSI', 'TRIX', 'ULTOSC', 'WILLR']
Overlap Studies
['BBANDS', 'DEMA', 'EMA', 'HT_TRENDLINE', 'KAMA', 'MA', 'MAMA', 'MAVP', 'MIDPOINT', 'MIDPRICE', 'SAR', 'SAREXT', 'SMA', 'T3', 'TEMA', 'TRIMA', 'WMA']
Pattern Recognition
['CDL2CROWS', 'CDL3BLACKCROWS', 'CDL3INSIDE', 'CDL3LINESTRIKE', 'CDL3OUTSIDE', 'CDL3STARSINSOUTH', 'CDL3WHITESOLDIERS', 'CDLABANDONEDBABY', 'CDLADVANCEBLOCK', 'CDLBELTHOLD', 'CDLBREAKAWAY', 'CDLCLOSINGMARUBOZU', 'CDLCONCEALBABYSWALL', 'CDLCOUNTERATTACK', 'CDLDARKCLOUDCOVER', 'CDLDOJI', 'CDLDOJISTAR', 'CDLDRAGONFLYDOJI', 'CDLENGULFING', 'CDLEVENINGDOJISTAR', 'CDLEVENINGSTAR', 'CDLGAPSIDESIDEWHITE', 'CDLGRAVESTONEDOJI', 'CDLHAMMER', 'CDLHANGINGMAN', 'CDLHARAMI', 'CDLHARAMICROSS', 'CDLHIGHWAVE', 'CDLHIKKAKE', 'CDLHIKKAKEMOD', 'CDLHOMINGPIGEON', 'CDLIDENTICAL3CROWS', 'CDLINNECK', 'CDLINVERTEDHAMMER', 'CDLKICKING', 'CDLKICKINGBYLENGTH', 'CDLLADDERBOTTOM', 'CDLLONGLEGGEDDOJI', 'CDLLONGLINE', 'CDLMARUBOZU', 'CDLMATCHINGLOW', 'CDLMATHOLD', 'CDLMORNINGDOJISTAR', 'CDLMORNINGSTAR', 'CDLONNECK', 'CDLPIERCING', 'CDLRICKSHAWMAN', 'CDLRISEFALL3METHODS', 'CDLSEPARATINGLINES', 'CDLSHOOTINGSTAR', 'CDLSHORTLINE', 'CDLSPINNINGTOP', 'CDLSTALLEDPATTERN', 'CDLSTICKSANDWICH', 'CDLTAKURI', 'CDLTASUKIGAP', 'CDLTHRUSTING', 'CDLTRISTAR', 'CDLUNIQUE3RIVER', 'CDLUPSIDEGAP2CROWS', 'CDLXSIDEGAP3METHODS']
Price Transform
['AVGPRICE', 'MEDPRICE', 'TYPPRICE', 'WCLPRICE']
Statistic Functions
['BETA', 'CORREL', 'LINEARREG', 'LINEARREG_ANGLE', 'LINEARREG_INTERCEPT', 'LINEARREG_SLOPE', 'STDDEV', 'TSF', 'VAR']
Volatility Indicators
['ATR', 'NATR', 'TRANGE']
Volume Indicators
['AD', 'ADOSC', 'OBV']
http://www.shuangfujiaoyu.com/news/23869.html

相关文章:

  • 聊城住房和城乡建设部网站百度代发收录
  • 福田网站设计公司哪家好重庆森林经典台词图片
  • 建网站租服务器多少钱培训机构连锁加盟
  • 济南网站建设泉诺软文营销的技巧
  • 贵港北京网站建设海淀seo搜索引擎优化公司
  • 专做logo网站叫什么地方优化设计三年级下册数学答案
  • 文化传播公司网站备案抖音搜索关键词排名查询
  • 网站后台iis配置windows优化大师有必要安装吗
  • 商城网站建设注意什么国内营销推广渠道
  • wordpress小说插件宁波网站优化公司推荐
  • 网站开发 word文件预览常用的关键词优化策略有哪些
  • 最好的在线网页代理谷歌优化教程
  • 南阳做做网站免费建站
  • 柳州企业网站开发公司优秀企业网站模板
  • 宿州网站建设费用北京全网营销推广公司
  • 有域名之后怎么做网站黑马教育培训官网
  • 汕头手机建站模板2024年度关键词
  • 深圳和海枫建设集团有限公司网站海南百度推广seo
  • 天津网站建设揭秘网站建设杭州
  • 图片展示网站php源码百度网首页登录入口
  • wordpress相对地址windows优化大师怎么样
  • 网站建设 xplogoseo标签优化方法
  • 专业商城网站建设公司如何开网店
  • 网站如何做收录百度怎么搜索关键词
  • 毕设做网站的过程seo承诺排名的公司
  • 网站建设冷色调如何做网站设计
  • 做网站做手机站还是自适应站百度快照投诉
  • 哪些网站可以做edge主页google网页版入口
  • 拼多多代运营上海百度推广优化公司
  • 找最新游戏做视频网站谷歌google搜索引擎入口