stock-python问题记录

第三方库安装

==========================================================================

第三方库whl列表 ,包括TA-lib

http://www.lfd.uci.edu/~gohlke/pythonlibs/


pip install TA_Lib-0.4.10-cp36-cp36m-win_amd64.whl

pip install tushare

======================================================================

20170921 实盘交易接口调试问题记录

1. 执行csc.login()时出错

原因:调用了谷歌OCR 工具tesseract,电脑上没有安装导致。

扫描二维码关注公众号,回复: 2600774 查看本文章

解决:1.下载tesseract:https://jaist.dl.sourceforge.net/project/tesseract-ocr-alt/tesseract-ocr-setup-3.02.02.exe

            2.代码中增加:pytesseract.pytesseract.tesseract_cmd = "D:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe"

               通过环境变量应该也能实现

参考博文:

               python下调用pytesseract识别某网站验证码

                      http://www.cnblogs.com/zhongtang/p/5560361.html

              Python下Tesseract Ocr引擎及安装介绍

                      http://www.cnblogs.com/zhongtang/p/5554784.html


2. window下调用tesseract会用CMD窗口... 一闪而过,通过下面方法修改

   修改文件:"D:\Anaconda3\Lib\site-packages\pytesseract\pytesseract.py"

    ########################################################################
    # modified by changziqi hide console window
    # new code 20179021
    IS_WIN32 = 'win32' in str(sys.platform).lower()
    if IS_WIN32:
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
        startupinfo.wShowWindow = subprocess.SW_HIDE
        proc = subprocess.Popen(command,stderr=subprocess.PIPE,startupinfo=startupinfo)  
    else:
        proc = subprocess.Popen(command, stderr=subprocess.PIPE)
    #########################################################################
    #--old code begin 20179021
    proc = subprocess.Popen(command, stderr=subprocess.PIPE)
    #--old code end 20179021


3.通过微信发送提醒信息

http://itchat.readthedocs.io/zh/latest/#_17


import itchat
itchat.auto_login()
itchat.send('Hello !', toUserName='filehelper')


猜你喜欢

转载自blog.csdn.net/rainbowbirds_aes/article/details/78053031