vnpy/binding/doc/build.linux.md
nanoric 16eb0bf44c [Mod] rename Readme.md into README.md
[Mod] updated build instruments
[Mod] move all documents into /doc
2019-01-22 03:49:43 -04:00

60 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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