本文共 1951 字,大约阅读时间需要 6 分钟。
之前在win10开发策略时的安装笔记,有需要的可以参考下。
个人建议还是在linux或mac下开发比较好,开源软件大多对win不够友好,使用linux可以避免很多坑。 参考文档 rqalpha地址:https://rqalpha.readthedocs.io/zh_CN/latest/intro/detail_install.html#intro-detail-install 1,使用win10已安装的Anaconda2-5.3.0-Windows-x86_64.exe,参考官方文档继续安装 pip install -U pip pip install -U setuptools2,安装bcolz
pip install bcolz==1.2.0 -i https://pypi.douban.com/simple 报错,想到ada安装在c盘,容易由权限引发问题,卸载安装到D盘3,换装Anaconda3-4.2.0-Windows-x86_64.exe到D盘
问题1,闪退 解决:https://blog.csdn.net/ws_developer/article/details/80953401 第2步,CONNECTION FAILED 解决:https://www.aliyun.com/jiaocheng/459144.html4,继续第二步的
pip install -U pip 报错:Cannot open D:\Program Files\Anaconda3\Scripts\pip-script.py 解决:easy_install pip pip install -U setuptools pip install bcolz==1.2.0 -i https://pypi.douban.com/simple 报错: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ 解决:下载vs,安装2017版本 pip install -i https://pypi.douban.com/simple rqalpha 问题:Cannot uninstall 'XlsxWriter'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. 解决:pip install --ignore-installed bcolz==1.2.0 -i https://pypi.douban.com/simple 看起来好了,没报错,但是rqalpha version,依然报错无法找到命令 解决:conda install bcolz -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ 看起来好,rqalpha version,还是无法找到命令 突然看到另一偏帖子:https://www.cnblogs.com/luhouxiang/p/8443857.html(好帖子) "安装bcolz,安装这个组件不能用pip执行,会失败,只能用easy_install。easy_install -U bcolz" 尝试了下 然后pip install -i https://pypi.douban.com/simple rqalpha --ignore-installed 看起来好了,rqalpha version也正常了5,pip install TA-Lib
参考:https://www.cnblogs.com/ttrrpp/p/6877218.html 下载whl最简单方式6,rqalpha update-bundle
数据下载成功: C:\Users\john\.rqalpha\bundle7,运行范例
rqalpha run -f "d:\Program Files\Anaconda3\Lib\site-packages\rqalpha\examples/buy_and_hold.py" -s 2017-01-01 -e 2017-06-30 --account stock 100000 --plot