Windows 10 安装TA-Lib python库
由于需要和朋友比对一个结果,需要在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 underlyingTA-Liblibrary, 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库的更多相关文章
- 【python】windows下安装xgboost的python库
傻瓜教程 主要参考了https://www.hongweipeng.com/index.php/archives/826/ 和 https://github.com/dmlc/xgboost/iss ...
- windows 10 安装tensorflow
人工智能一浪接一浪,随着谷歌公布tensorflow源码,尤其是支持windows 10平台的python3.5以上版本,更是让更多人都想用windows操作tensorflow. 第一次安装,也不知 ...
- Windows 10安装uWSGI:不可行、失败了
Windows 10家庭中文版,Python 3.6.4,uwsgi-2.0.17.tar.gz,压缩工具-7-zip 提示:请不要和我一样尝试,浪费时间,去Linux上玩吧! 几个小时的安装经历 昨 ...
- opencv学习(1.2) - Windows 10 安装OpenCV &配置VS 2015
windows 10 安装OpenCV&配置VS 2015 环境 系统:Windows 10 OpenCV版本:3.4.1 开发IDE:VS2015 社区版 下载安装 下载OpenCV 3.4 ...
- Windows下安装PCL点云库
原文链接:http://blog.csdn.net/u012337034/article/details/38270109 简介: 在Windows下安装PCL点云库的方法大概有两种: ...
- 2016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:
14:59 2016/1/112016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:注意问题:1.手动安装2.5.0和pear安装方式都成功但是执行时无任何反映, ...
- 2016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:5分钟安装 30分钟入门和浏览常用命令
14:59 2016/1/112016最新 wamp2.5+windows 10安装CoedSgniffer代码格式检查:注意问题:1.手动安装2.5.0和pear安装方式都成功但是执行时无任何反映, ...
- OpenGL学习之windows下安装opengl的glut库
OpenGL学习之windows下安装opengl的glut库 GLUT不是OpenGL所必须的,但它会给我们的学习带来一定的方便,推荐安装. Windows环境下的GLUT下载地址:(大小约为15 ...
- windows上安装Anaconda和python的教程详解
一提到数字图像处理编程,可能大多数人就会想到matlab,但matlab也有自身的缺点: 1.不开源,价格贵 2.软件容量大.一般3G以上,高版本甚至达5G以上. 3.只能做研究,不易转化成软件. 因 ...
- Windows 10 安装 Git 与初次运行前的配置
Windows 10 安装 Git 与初次运行前的配置 在 Windows 上安装 初次运行 Git 前的配置 用户信息 文本编辑器 检查配置信息 获取 Git 仓库 在现有目录中初始化仓库 克隆现有 ...
随机推荐
- 一个有趣的回答(摘自http://www.51testing.com/html/03/n-860703.html)
假设这有一个各种字母组成的字符串,假设这还有另外一个字符串,而且这个字符串里的字母数相对少一些.从算法上讲,什么方法能最快的查出所有小字符串里的字母在大字符串里都有? 比如,如果是下面两个字符串: S ...
- Python3学习(一)-基础、数据类型、变量、字符串和编码、list&tuple、if、for、while、dict、set、函数与参数
##廖雪峰py3笔记 ## '//'这是获得相除后的整数部分 ##a = 10//3 ##print (a) ## '/'获得相除后的结果,为浮点数,结果能整除也也是浮点数 ##b = 10/3 ## ...
- java多线程系列之 synchronized
一.synchronized基本原理 java的内置锁:每个java对象都可以用做一个实现同步的锁,这些锁成为内置锁.线程进入同步代码块或方法的时候会自动获得该锁,在退出同步代码块或方法时会释放该锁. ...
- Ubuntu下freeradius-server的安装
一.安装 (1)更新 #apt-get update (2)下载 链接:ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.2.9. ...
- JavaScript封装
js封装就是把使用方式简单化,内部逻辑和使用解耦.使用人员知道参数和返回值就可以了,其他不用使用人员设置. 封装就是将属性,方法,字段等封装成类. JavaScript封装方法 1,函数方式 func ...
- 关于升级xcode8
升级xcode8已是必然,升级ios10的用户不能说大有人在,应该也不会少,如果不升级xcode8,上架最新的包,那么可能应用在ios10 上是不支持的.so,这些xcode8的新特性,你应该了解!! ...
- C++的STL
今天,看一段代码的时候发现只一句话就做了个排序,是这样的: sort(rotateArray.begin(),rotateArray.end()); 很震惊,后来查了一下sort的用法, sort函数 ...
- python入门笔记
创建变量 python的变量不需要声明数据类型. >>> fred=100 >>> print (fred) 100 >>> fred 100 创 ...
- controller 解析xml文件
public ActionResult Index() { XmlReader reader = null; try { //获取路径 ..\TGB.Common.Message\TGB.Common ...
- IOS managerTime
1. NSString ->NSdate NSString *birthday = self.btnBirthday.titleLabel.text; NSDateFormatter *dat ...