16eb0bf44c
[Mod] updated build instruments [Mod] move all documents into /doc
1.0 KiB
1.0 KiB
Building vnpy.binding on Linux
目前只有Ubuntu和CentOS两种Linux发行版的教程。
硬件要求
使用G++编译vnpy.binding需要至少3G的可用内存,否则请调整虚拟内存大小。
Ubuntu
首先是安装编译套件,python3及其依赖库,git,cmake:
sudo apt install -y build-essential python3.7 python3.7-dev git cmake
然后克隆vnpy源码:
git clone https://github.com/vnpy/vnpy.git
cd vnpy
git checkout v2.0-DEV
构建
cd binding
mkdir build; cd build
cmake ..
make
CentOS
首先启用epel和scl源
sudo yum install -y epel-release centos-release-scl
然后安装编译套件,python3及其依赖库,git,cmake:
sudo yum install -y devtoolset-7 python36 python36-devel git cmake3
接着克隆vnpy源码:
git clone https://github.com/vnpy/vnpy.git
cd vnpy
git checkout v2.0-DEV
最后启用gcc7并构建:
cd binding
mkdir build; cd build
scl enable devtoolset-7 bash
cmake3 ..
make