由于需要和朋友比对一个结果,需要在Windows 10中安装TA-Lib库,写点简单的python代码。

本来以为就简单的执行下pip install TA-Lib就OK了。

然后,安装失败:

fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.
网上搜索,提示:This typically means that it can't find the underlying TA-Lib library, a dependency which needs to be installed.
但是没有进一步说怎么安装TA-Lib库。于是翻看setup.py代码,发现如果是win32系统,会到C盘去找TA-Lib库 于是直接把ta-lib-0.4.0-msvc.zip里的 ta-lib/c 目录里的所有内容拷贝到c:\ta-lib\c 下。 执行pip install TA-Lib。
然后,安装还是失败:
common.obj : warning LNK4197: export 'PyInit_common' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.lib and object build\temp.win-amd64-3.5\Release\talib\common.cp35-win_amd64.exp
common.obj : error LNK2001: unresolved external symbol TA_SetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_Shutdown
common.obj : error LNK2001: unresolved external symbol TA_Initialize
common.obj : error LNK2001: unresolved external symbol TA_GetUnstablePeriod
common.obj : error LNK2001: unresolved external symbol TA_GetVersionString
build\lib.win-amd64-3.5\talib\common.cp35-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\link.exe' failed with exit status 1120
链接错误。。。。。。翻看了一些ta-lib在github上的issue,里面提到ta-lib的C库是32位的。
但是pip安装的时候需要编译common.c,然后再和ta-lib的C库中的lib链接起来,问题就在这里了。github上有人建议重新在64位下编译ta-lib库来解决这个问题。 经过几番挣扎,最后的解决方法是:
开始  -> 所有程序 -> Mircosoft Visual Studio 2010 -> visual studio tools -> Visual Studio x64 win64 command prompt (2010) 在VS x64 win64命令行下,cd C:\ta-lib\c\make\cdr\win32\msvc 目录下,执行nmake
等执行完毕后,再运行pip install ta-lib, 这次终于成功了

												

Windows 10 安装TA-Lib python库的更多相关文章

  1. 【python】windows下安装xgboost的python库

    傻瓜教程 主要参考了https://www.hongweipeng.com/index.php/archives/826/  和 https://github.com/dmlc/xgboost/iss ...

  2. windows 10 安装tensorflow

    人工智能一浪接一浪,随着谷歌公布tensorflow源码,尤其是支持windows 10平台的python3.5以上版本,更是让更多人都想用windows操作tensorflow. 第一次安装,也不知 ...

  3. Windows 10安装uWSGI:不可行、失败了

    Windows 10家庭中文版,Python 3.6.4,uwsgi-2.0.17.tar.gz,压缩工具-7-zip 提示:请不要和我一样尝试,浪费时间,去Linux上玩吧! 几个小时的安装经历 昨 ...

  4. opencv学习(1.2) - Windows 10 安装OpenCV &配置VS 2015

    windows 10 安装OpenCV&配置VS 2015 环境 系统:Windows 10 OpenCV版本:3.4.1 开发IDE:VS2015 社区版 下载安装 下载OpenCV 3.4 ...

  5. Windows下安装PCL点云库

    原文链接:http://blog.csdn.net/u012337034/article/details/38270109 简介:         在Windows下安装PCL点云库的方法大概有两种: ...

  6. 2016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:

    14:59 2016/1/112016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:注意问题:1.手动安装2.5.0和pear安装方式都成功但是执行时无任何反映, ...

  7. 2016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:5分钟安装 30分钟入门和浏览常用命令

    14:59 2016/1/112016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:注意问题:1.手动安装2.5.0和pear安装方式都成功但是执行时无任何反映, ...

  8. OpenGL学习之windows下安装opengl的glut库

    OpenGL学习之windows下安装opengl的glut库 GLUT不是OpenGL所必须的,但它会给我们的学习带来一定的方便,推荐安装.  Windows环境下的GLUT下载地址:(大小约为15 ...

  9. windows上安装Anaconda和python的教程详解

    一提到数字图像处理编程,可能大多数人就会想到matlab,但matlab也有自身的缺点: 1.不开源,价格贵 2.软件容量大.一般3G以上,高版本甚至达5G以上. 3.只能做研究,不易转化成软件. 因 ...

  10. Windows 10 安装 Git 与初次运行前的配置

    Windows 10 安装 Git 与初次运行前的配置 在 Windows 上安装 初次运行 Git 前的配置 用户信息 文本编辑器 检查配置信息 获取 Git 仓库 在现有目录中初始化仓库 克隆现有 ...

随机推荐

  1. Result Maps collection does not contain value for java.lang.Integer异常处理

    使用Mybatis的时候出现这个问题是因为配置文件的问题造成的,mybatis需要写大量的配置文件, 尽管有mybatis-generator,但是里面的内容有很多还是要自己去写的,在这过程中难免会出 ...

  2. MySQL workbench 中文乱码 显示口口

    Edit-->perference...-->Apperance  如下图 即可 转载自:http://blog.csdn.net/shxluwei/article/details/802 ...

  3. Ajax读取txt并对txt内容进行分页显示

    function TransferString(content) { var string = content; try{ string=string.replace(/\r\n/g,"&l ...

  4. js⑦

    立即执行函数or自执行函数 为了避免全局变量的产生.(function(){ //var a = 10; //var b = 20;//console.log(a,b); -------------v ...

  5. Python开发入门与实战16-APACHE部署

    16. Windows平台apache部署 本章节我们简要的描述一下如何在windows平台部署apache的django站点. Python Django 项目部署发布到windows apache ...

  6. cookie 保存上次访问url方法

    if (Session[Enums.UserInfoSeesion] == null) { HttpCookie cookie = Request.Cookies[Enums.UserLastAcce ...

  7. CIImage实现滤镜效果

    Core Image also provides autoadjustment methods that analyze an image for common deficiencies and re ...

  8. MVC 请求处理流程(二)

    [上一篇]中我们说到了对象AsyncControllerActionInvoker,在Controller的ExecuteCore方法中调用AsyncControllerActionInvoker对象 ...

  9. thinkPHP(待更新)

    一些函数 1.  set_include_path().get_include_path() .PATH_SEPARATOR 设置php加载的路径 2.  register_shutdown_func ...

  10. html5 请求的URL转成 OC可用属性字符串显示

    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:helpUrlStr]]; NSString *string = [ ...