如何在Google Colab中安装TA-lib? !make命令失败

时间:2018-12-09 17:57:13

标签: python google-colaboratory ta-lib

我经历了以下答案中提到的步骤

How to install TA-lib in google colab?

!wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
!tar -xzvf ta-lib-0.4.0-src.tar.gz
%cd ta-lib
!./configure --prefix=/usr
!make
!make install
!pip install Ta-Lib
import talib

但是在!make命令中,我得到以下错误 (好像空间是我的驱动器  在“ ar x / content / drive /我的驱动器/app/ta-lib/src/ta_abstract/.libs/libta_abstract.a)ar:/ content / drive / My:无此类文件或目录”)

在Google驱动器上创建问题,请让我知道如何解决问题

  

gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT   ta_TRIX.lo -MD -MP -MF .deps / ta_TRIX.Tpo -c ta_TRIX.c -fPIC -DPIC -o   .libs / ta_TRIX.o gcc -DHAVE_CONFIG_H -I。 -I ../../ include   -I ../ ta_common / -g -O2 -MT ta_TRIX.lo -MD -MP -MF .deps / ta_TRIX.Tpo -c ta_TRIX.c -o ta_TRIX.o> / dev / null 2>&1 mv -f。 deps / ta_TRIX.Tpo   .deps / ta_TRIX.Plo / bin / bash ../../libtool --tag = CC --mode = compile   gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT   ta_TSF.lo -MD -MP -MF .deps / ta_TSF.Tpo -c -o ta_TSF.lo ta_TSF.c gcc   -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_TSF.lo -MD -MP -MF .deps / ta_TSF.Tpo -c ta_TSF.c -fPIC -DPIC -o   .libs / ta_TSF.o gcc -DHAVE_CONFIG_H -I。 -I ../../ include   -I ../ ta_common / -g -O2 -MT ta_TSF.lo -MD -MP -MF .deps / ta_TSF.Tpo -c ta_TSF.c -o ta_TSF.o> / dev / null 2>&1 mv -f。 deps / ta_TSF.Tpo   .deps / ta_TSF.Plo / bin / bash ../../libtool --tag = CC --mode = compile gcc   -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_TYPPRICE.lo -MD -MP -MF .deps / ta_TYPPRICE.Tpo -c -o ta_TYPPRICE.lo   ta_TYPPRICE.c gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common /   -g -O2 -MT ta_TYPPRICE.lo -MD -MP -MF .deps / ta_TYPPRICE.Tpo -c ta_TYPPRICE.c -fPIC -DPIC -o .libs / ta_TYPPRICE.o gcc -DHAVE_CONFIG_H   -一世。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_TYPPRICE.lo -MD -MP -MF .deps / ta_TYPPRICE.Tpo -c ta_TYPPRICE.c -o ta_TYPPRICE.o> / dev / null 2>&1 mv -f .deps / ta_TYPPRICE.Tpo .deps / ta_TYPPRICE.Plo / bin / bash   ../../libtool --tag = CC --mode = compile gcc -DHAVE_CONFIG_H -I。   -I ../../ include -I ../ ta_common / -g -O2 -MT ta_ULTOSC.lo -MD -MP -MF .deps / ta_ULTOSC.Tpo -c -o ta_ULTOSC.lo ta_ULTOSC.c gcc   -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_ULTOSC.lo -MD -MP -MF .deps / ta_ULTOSC.Tpo -c ta_ULTOSC.c -fPIC   -DPIC -o .libs / ta_ULTOSC.o gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_ULTOSC.lo -MD -MP -MF .deps / ta_ULTOSC.Tpo -c ta_ULTOSC.c -o ta_ULTOSC.o> / dev / null 2>&1 mv   -f .deps / ta_ULTOSC.Tpo .deps / ta_ULTOSC.Plo / bin / bash ../../libtool --tag = CC --mode = compile gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_VAR.lo -MD -MP -MF .deps / ta_VAR.Tpo -c -o ta_VAR.lo ta_VAR.c gcc -DHAVE_CONFIG_H -一世。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_VAR.lo -MD -MP -MF .deps / ta_VAR.Tpo -c ta_VAR.c -fPIC -DPIC -o .libs /ta_VAR.o gcc -DHAVE_CONFIG_H -I。   -I ../../ include -I ../ ta_common / -g -O2 -MT ta_VAR.lo -MD -MP -MF .deps / ta_VAR.Tpo -c ta_VAR.c -o ta_VAR.o> / dev / null 2>&1 mv -f   .deps / ta_VAR.Tpo .deps / ta_VAR.Plo / bin / bash ../../libtool --tag = CC
  --mode =编译gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WCLPRICE.lo -MD -MP -MF .deps / ta_WCLPRICE.Tpo -c -o ta_WCLPRICE.lo ta_WCLPRICE.c gcc   -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WCLPRICE.lo -MD -MP -MF .deps / ta_WCLPRICE.Tpo -c ta_WCLPRICE.c   -fPIC -DPIC -o .libs / ta_WCLPRICE.o gcc -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WCLPRICE.lo -MD -MP -MF .deps / ta_WCLPRICE.Tpo -c ta_WCLPRICE.c -o ta_WCLPRICE.o> / dev /空值   2>&1 mv -f .deps / ta_WCLPRICE.Tpo .deps / ta_WCLPRICE.Plo / bin / bash   ../../libtool --tag = CC --mode = compile gcc -DHAVE_CONFIG_H -I。   -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WILLR.lo -MD -MP -MF .deps / ta_WILLR.Tpo -c -o ta_WILLR.lo ta_WILLR.c gcc -DHAVE_CONFIG_H   -一世。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WILLR.lo -MD -MP -MF .deps / ta_WILLR.Tpo -c ta_WILLR.c -fPIC -DPIC -o .libs /ta_WILLR.o gcc   -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WILLR.lo -MD -MP -MF .deps / ta_WILLR.Tpo -c ta_WILLR.c -o ta_WILLR.o

     
    

/ dev / null 2>&1 mv -f .deps / ta_WILLR.Tpo .deps / ta_WILLR.Plo / bin / bash ../../libtool --tag = CC --mode = compile gcc -DHAVE_CONFIG_H-一世。     -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WMA.lo -MD -MP -MF .deps / ta_WMA.Tpo -c -o ta_WMA.lo ta_WMA.c gcc -DHAVE_CONFIG_H -一世。     -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WMA.lo -MD -MP -MF .deps / ta_WMA.Tpo -c ta_WMA.c -fPIC -DPIC -o .libs /ta_WMA.o gcc     -DHAVE_CONFIG_H -I。 -I ../../ include -I ../ ta_common / -g -O2 -MT ta_WMA.lo -MD -MP -MF .deps / ta_WMA.Tpo -c ta_WMA.c -o ta_WMA.o     / dev / null 2>&1 mv -f .deps / ta_WMA.Tpo .deps / ta_WMA.Plo / bin / bash ../../libtool --tag = CC --mode = link gcc -g -O2 -version -信息0:0:0     -o libta_func.la ta_utility.lo ta_ACOS.lo ta_AD.lo ta_ADD.lo ta_ADOSC.lo ta_ADX.lo ta_ADXR.lo ta_APO.lo ta_AROON.lo ta_AROONOSC.lo     ta_ASIN.lo ta_ATAN.​​lo ta_ATR.lo ta_AVGPRICE.lo ta_BBANDS.lo ta_BETA.lo     ta_BOP.lo ta_CCI.lo ta_CDL2CROWS.lo ta_CDL3BLACKCROWS.lo     ta_CDL3INSIDE.lo ta_CDL3LINESTRIKE.lo ta_CDL3OUTSIDE.lo     ta_CDL3STARSINSOUTH.lo ta_CDL3WHITESOLDIERS.lo ta_CDLABANDONEDBABY.lo     ta_CDLADVANCEBLOCK.lo ta_CDLBELTHOLD.lo ta_CDLBREAKAWAY.lo     ta_CDLCLOSINGMARUBOZU.lo ta_CDLCONCEALBABYSWALL.lo     ta_CDLCOUNTERATTACK.lo ta_CDLDARKCLOUDCOVER.lo ta_CDLDOJI.lo     ta_CDLDOJISTAR.lo ta_CDLDRAGONFLYDOJI.lo ta_CDLENGULFING.lo     ta_CDLEVENINGDOJISTAR.lo ta_CDLEVENINGSTAR.lo     ta_CDLGAPSIDESIDEWHITE.lo ta_CDLGRAVESTONEDOJI.lo ta_CDLHAMMER.lo     ta_CDLHANGINGMAN.lo ta_CDLHARAMI.lo ta_CDLHARAMICROSS.lo     ta_CDLHIGHWAVE.lo ta_CDLHIKKAKE.lo ta_CDLHIKKAKEMOD.lo     ta_CDLHOMINGPIGEON.lo ta_CDLIDENTICAL3CROWS.lo ta_CDLINNECK.lo     ta_CDLINVERTEDHAMMER.lo ta_CDLKICKING.lo ta_CDLKICKINGBYLENGTH.lo     ta_CDLLADDERBOTTOM.lo ta_CDLLONGLEGGEDDOJI.lo ta_CDLLONGLINE.lo     ta_CDLMARUBOZU.lo ta_CDLMATCHINGLOW.lo ta_CDLMATHOLD.lo     ta_CDLMORNINGDOJISTAR.lo ta_CDLMORNINGSTAR.lo ta_CDLONNECK.lo     ta_CDLPIERCING.lo ta_CDLRICKSHAWMAN.lo ta_CDLRISEFALL3METHODS.lo     ta_CDLSEPARATINGLINES.lo ta_CDLSHOOTINGSTAR.lo ta_CDLSHORTLINE.lo     ta_CDLSPINNINGTOP.lo ta_CDLSTALLEDPATTERN.lo ta_CDLSTICKSANDWICH.lo     ta_CDLTAKURI.lo ta_CDLTASUKIGAP.lo ta_CDLTHRUSTING.lo ta_CDLTRISTAR.lo     ta_CDLUNIQUE3RIVER.lo ta_CDLUPSIDEGAP2CROWS.lo     ta_CDLXSIDEGAP3METHODS.lo ta_CEIL.lo ta_CMO.lo ta_CORREL.lo ta_COS.lo     ta_COSH.lo ta_DEMA.lo ta_DIV.lo ta_DX.lo ta_EMA.lo ta_EXP.lo     ta_FLOOR.lo ta_HT_DCPERIOD.lo ta_HT_DCPHASE.lo ta_HT_PHASOR.lo     ta_HT_SINE.lo ta_HT_TRENDLINE.lo ta_HT_TRENDMODE.lo ta_KAMA.lo     ta_LINEARREG.lo ta_LINEARREG_ANGLE.lo ta_LINEARREG_INTERCEPT.lo     ta_LINEARREG_SLOPE.lo ta_LN.lo ta_LOG10.lo ta_MA.lo ta_MACD.lo     ta_MACDEXT.lo ta_MACDFIX.lo ta_MAMA.lo ta_MAVP.lo ta_MAX.lo     ta_MAXINDEX.lo ta_MEDPRICE.lo ta_MFI.lo ta_MIDPOINT.lo ta_MIDPRICE.lo     ta_MIN.lo ta_MININDEX.lo ta_MINMAX.lo ta_MINMAXINDEX.lo ta_MINUS_DI.lo     ta_MINUS_DM.lo ta_MOM.lo ta_MULT.lo ta_NATR.lo ta_OBV.lo ta_PLUS_DI.lo     ta_PLUS_DM.lo ta_PPO.lo ta_ROC.lo ta_ROCP.lo ta_ROCR.lo ta_ROCR100.lo     ta_RSI.lo ta_SAR.lo ta_SAREXT.lo ta_SIN.lo ta_SINH.lo ta_SMA.lo     ta_SQRT.lo ta_STDDEV.lo ta_STOCH.lo ta_STOCHF.lo ta_STOCHRSI.lo     ta_SUB.lo ta_SUM.lo ta_T3.lo ta_TAN.lo ta_TANH.lo ta_TEMA.lo     ta_TRANGE.lo ta_TRIMA.lo ta_TRIX.lo ta_TSF.lo ta_TYPPRICE.lo     ta_ULTOSC.lo ta_VAR.lo ta_WCLPRICE.lo ta_WILLR.lo ta_WMA.lo -lpthread     -ldl libtool:链接:警告:-version-info/-version-number' is ignored for convenience libraries ar cru .libs/libta_func.a .libs/ta_utility.o .libs/ta_ACOS.o .libs/ta_AD.o .libs/ta_ADD.o .libs/ta_ADOSC.o .libs/ta_ADX.o .libs/ta_ADXR.o .libs/ta_APO.o .libs/ta_AROON.o .libs/ta_AROONOSC.o .libs/ta_ASIN.o .libs/ta_ATAN.o .libs/ta_ATR.o .libs/ta_AVGPRICE.o .libs/ta_BBANDS.o .libs/ta_BETA.o .libs/ta_BOP.o .libs/ta_CCI.o .libs/ta_CDL2CROWS.o .libs/ta_CDL3BLACKCROWS.o .libs/ta_CDL3INSIDE.o .libs/ta_CDL3LINESTRIKE.o .libs/ta_CDL3OUTSIDE.o .libs/ta_CDL3STARSINSOUTH.o .libs/ta_CDL3WHITESOLDIERS.o .libs/ta_CDLABANDONEDBABY.o .libs/ta_CDLADVANCEBLOCK.o .libs/ta_CDLBELTHOLD.o .libs/ta_CDLBREAKAWAY.o .libs/ta_CDLCLOSINGMARUBOZU.o .libs/ta_CDLCONCEALBABYSWALL.o .libs/ta_CDLCOUNTERATTACK.o .libs/ta_CDLDARKCLOUDCOVER.o .libs/ta_CDLDOJI.o .libs/ta_CDLDOJISTAR.o .libs/ta_CDLDRAGONFLYDOJI.o .libs/ta_CDLENGULFING.o .libs/ta_CDLEVENINGDOJISTAR.o .libs/ta_CDLEVENINGSTAR.o .libs/ta_CDLGAPSIDESIDEWHITE.o .libs/ta_CDLGRAVESTONEDOJI.o .libs/ta_CDLHAMMER.o .libs/ta_CDLHANGINGMAN.o .libs/ta_CDLHARAMI.o .libs/ta_CDLHARAMICROSS.o .libs/ta_CDLHIGHWAVE.o .libs/ta_CDLHIKKAKE.o .libs/ta_CDLHIKKAKEMOD.o .libs/ta_CDLHOMINGPIGEON.o .libs/ta_CDLIDENTICAL3CROWS.o .libs/ta_CDLINNECK.o .libs/ta_CDLINVERTEDHAMMER.o .libs/ta_CDLKICKING.o .libs/ta_CDLKICKINGBYLENGTH.o .libs/ta_CDLLADDERBOTTOM.o .libs/ta_CDLLONGLEGGEDDOJI.o .libs/ta_CDLLONGLINE.o .libs/ta_CDLMARUBOZU.o .libs/ta_CDLMATCHINGLOW.o .libs/ta_CDLMATHOLD.o .libs/ta_CDLMORNINGDOJISTAR.o .libs/ta_CDLMORNINGSTAR.o .libs/ta_CDLONNECK.o .libs/ta_CDLPIERCING.o .libs/ta_CDLRICKSHAWMAN.o .libs/ta_CDLRISEFALL3METHODS.o .libs/ta_CDLSEPARATINGLINES.o .libs/ta_CDLSHOOTINGSTAR.o .libs/ta_CDLSHORTLINE.o .libs/ta_CDLSPINNINGTOP.o .libs/ta_CDLSTALLEDPATTERN.o .libs/ta_CDLSTICKSANDWICH.o .libs/ta_CDLTAKURI.o .libs/ta_CDLTASUKIGAP.o .libs/ta_CDLTHRUSTING.o .libs/ta_CDLTRISTAR.o .libs/ta_CDLUNIQUE3RIVER.o .libs/ta_CDLUPSIDEGAP2CROWS.o .libs/ta_CDLXSIDEGAP3METHODS.o .libs/ta_CEIL.o .libs/ta_CMO.o .libs/ta_CORREL.o .libs/ta_COS.o .libs/ta_COSH.o .libs/ta_DEMA.o .libs/ta_DIV.o .libs/ta_DX.o .libs/ta_EMA.o .libs/ta_EXP.o .libs/ta_FLOOR.o .libs/ta_HT_DCPERIOD.o .libs/ta_HT_DCPHASE.o .libs/ta_HT_PHASOR.o .libs/ta_HT_SINE.o .libs/ta_HT_TRENDLINE.o .libs/ta_HT_TRENDMODE.o .libs/ta_KAMA.o .libs/ta_LINEARREG.o .libs/ta_LINEARREG_ANGLE.o .libs/ta_LINEARREG_INTERCEPT.o .libs/ta_LINEARREG_SLOPE.o .libs/ta_LN.o .libs/ta_LOG10.o .libs/ta_MA.o .libs/ta_MACD.o .libs/ta_MACDEXT.o .libs/ta_MACDFIX.o .libs/ta_MAMA.o .libs/ta_MAVP.o .libs/ta_MAX.o .libs/ta_MAXINDEX.o .libs/ta_MEDPRICE.o .libs/ta_MFI.o .libs/ta_MIDPOINT.o .libs/ta_MIDPRICE.o .libs/ta_MIN.o .libs/ta_MININDEX.o .libs/ta_MINMAX.o .libs/ta_MINMAXINDEX.o .libs/ta_MINUS_DI.o .libs/ta_MINUS_DM.o .libs/ta_MOM.o .libs/ta_MULT.o .libs/ta_NATR.o .libs/ta_OBV.o .libs/ta_PLUS_DI.o .libs/ta_PLUS_DM.o .libs/ta_PPO.o .libs/ta_ROC.o .libs/ta_ROCP.o .libs/ta_ROCR.o .libs/ta_ROCR100.o .libs/ta_RSI.o .libs/ta_SAR.o .libs/ta_SAREXT.o .libs/ta_SIN.o .libs/ta_SINH.o .libs/ta_SMA.o .libs/ta_SQRT.o .libs/ta_STDDEV.o .libs/ta_STOCH.o .libs/ta_STOCHF.o .libs/ta_STOCHRSI.o .libs/ta_SUB.o .libs/ta_SUM.o .libs/ta_T3.o .libs/ta_TAN.o .libs/ta_TANH.o .libs/ta_TEMA.o .libs/ta_TRANGE.o .libs/ta_TRIMA.o .libs/ta_TRIX.o .libs/ta_TSF.o .libs/ta_TYPPRICE.o .libs/ta_ULTOSC.o .libs/ta_VAR.o .libs/ta_WCLPRICE.o .libs/ta_WILLR.o .libs/ta_WMA.o ar: u'修饰符     由于D' is the default (see U')ranlib .libs / libta_func.a而被忽略     创建libta_func.la(cd .libs && rm -f libta_func.la && cp -p     ../libta_func.la libta_func.la)make [2]:离开目录     '/ content / drive /我的驱动器/ app / ta-lib / src / ta_func'make [2]:输入     目录'/ content / drive / My Drive / app / ta-lib / src'/ bin / bash     ../libtool --tag = CC --mode = link gcc -g -O2 -version-info 0:0:0 -o     libta_lib.la -rpath / usr / lib ta_abstract / libta_abstract.la     ta_func / libta_func.la ta_common / libta_common.la -lpthread -ldl mkdir     .libs gcc -shared -Wl,-完整存档     ta_abstract / .libs / libta_abstract.a ta_func / .libs / libta_func.a     ta_common / .libs / libta_common.a -Wl,-no-whole-archive -lpthread -ldl     -Wl,-soname -Wl,libta_lib.so.0 -o .libs / libta_lib.so.0.0.0(cd .libs && rm -f libta_lib.so.0 && cp -p libta_lib.so.0.0.0 libta_lib .so.0)     (cd .libs && rm -f libta_lib.so && cp -p libta_lib.so.0.0.0     libta_lib.so)rm -fr .libs / libta_lib.lax mkdir .libs / libta_lib.lax rm     -fr .libs / libta_lib.lax / libta_abstract.a mkdir .libs / libta_lib.lax / libta_abstract.a(cd     .libs / libta_lib.lax / libta_abstract.a && ar x / content / drive /我的     驱动器/app/ta-lib/src/ta_abstract/.libs/libta_abstract.a)ar:     / content / drive /我:没有这样的文件或目录Makefile:262:的配方     目标'libta_lib.la'失败make [2]: * [libta_lib.la]错误9     make [2]:离开目录'/ content / drive / My Drive / app / ta-lib / src'     Makefile:283:目标“全部递归”的配方失败make [1]:*     [全部递归]错误1 make [1]:离开目录'/ content / drive / My     Drive / app / ta-lib / src'Makefile:283:目标“全递归”配方     失败制作:*** [所有递归]错误1

  

2 个答案:

答案 0 :(得分:0)

如果“我的云端硬盘”中的空间有问题。您可以先移至/ content。

%cd /content

答案 1 :(得分:0)

这里是示例:

!pip install feature_selector
!wget https://launchpad.net/~mario-mariomedina/+archive/ubuntu/talib/+files/libta-lib0_0.4.0-oneiric1_amd64.deb -qO libta.deb
!wget https://launchpad.net/~mario-mariomedina/+archive/ubuntu/talib/+files/ta-lib0-dev_0.4.0-oneiric1_amd64.deb -qO ta.deb
!dpkg -i libta.deb ta.deb
!pip install ta-lib
import talib

请参阅:How to install TA-lib in google colab?