下载Talib进行最后一年项目时出错

时间:2019-02-14 14:17:06

标签: python python-3.x python-2.7

我想安装Talib以便为KDJ指示器编写代码。但是,我无法安装它。

我已经从https://www.lfd.uci.edu/~gohlke/pythonlibs/下载了文件,并在Anaconda提示符下写了pip install Talib,但随后出现以下错误:

  ----------------------------------------
 Failed building wheel for talib
  Running setup.py clean for talib
Failed to build talib
Installing collected packages: talib
  Running setup.py install for talib ... error
    Complete output from command "C:\Users\Jun Yap\Anaconda3\python.exe" -u -c "import setuptools, 
tokenize;__file__='C:\\Users\\JUNYAP~1\\AppData\\Local\\Temp\\pip-install-dgdxm9b0\\talib\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\JUNYAP~1\AppData\Local\Temp\pip-record-w0546kkg\install-record.txt --single-version-externally-managed --compile:
    running install
Traceback (most recent call last):
  File "<string>", line 1, in <module>
      File "C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\setup.py", line 47, in <module>
    'talib = talib.cli:cli',
      File "C:\Users\Jun Yap\Anaconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\Jun Yap\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
  File "C:\Users\Jun Yap\Anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
      File "C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\setup.py", line 20, in run
    raise Exception("You probably meant to install and run ta-lib")
Exception: You probably meant to install and run ta-lib
dgdxm9b0\\talib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\JUNYAP~1\AppData\Local\Temp\pip-
record-w0546kkg\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\JUNYAP~1\AppData\Local\Temp\pip-install-dgdxm9b0\talib\

我可以知道是否还有其他方法可以在python中安装Talib?

谢谢。

1 个答案:

答案 0 :(得分:0)

错误提示:

You probably meant to install and run ta-lib

实际上,the description on PyPItalib是“防止漏洞利用的软件包”。

看看package source可以确认这一点,因为它只包含几个存根,它们返回“您可能要安装ta-lib”。

要安装“真实的” ta-lib,应运行pip install ta-lib