一、安装windows7sp1x64
二、官网下载安装Windows6.1-KB4019990-x64
三、官网下载安装Microsoft .NET Framework 4.7
四、官网下载安装vc_redist2015.x64
五、打开https://github.com/vnpy/vnpy/blob/dev/init.bat 按照 init.bat内容进行安装
1、安装chocolatey (类似于centos中的yum)
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
2、通过chocolatey安装Anaconda
choco install anaconda2 --version 4.0.0 --x86 -y --ignorechecksum --params="'/AddToPath=1'"
setx PATH "%PATH%;C:\Program Files\Anaconda2\;C:\Program Files\Anaconda2\Scripts\"
3、安装VC Redist
choco install vcredist2013 --x86 -y
4、安装Git
choco install git -y
5、下载vn.py
call refreshenv
cd c:\
git clone "https://github.com/vnpy/vnpy.git"
cd vnpy
git checkout dev
6、到mongodb官网下载最新x86 32位的mongodb msi安装包,安装
7、注册MongoDB为系统服务
mkdir c:\data\db
mkdir c:\data\log
"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --logpath c:\data\log\mongodb.log --logappend --dbpath c:\data\db --directoryperdb --serviceName MongoDB --install
net start MongoDB
8、安装vn.py
打开https://github.com/vnpy/vnpy/blob/dev/install.bat 按照install.bat内容进行环境配置
::Install Python Modules
pip install -r requirements.txt
::Install Ta-Lib
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda install -c quantopian ta-lib=0.4.9 -y
::conda install -c conda-forge python-snappy -y
:: Install vn.py
python setup.py install
六、修改examples\VnTrader\CTP_connect.json的simnow ctp模拟交易账号和密码,然后打开vntrade.bat即可启动vnpy图形界面
转载于:https://blog.51cto.com/efoni/2140493