도움말

bbgo 문서 및 가이드 뒤로가기
Get Started with BBGO 1.0
genonfire
514 0
2018-06-28 13:53:41
https://gencode.me/16/
125.178.*.*
2019-03-02 22:54:31

OS


Following instructions are based on Ubuntu 14.04 (16.04 tested) or Linux on Windows.


pyenv virtualenv


  • Skip this section if you already have your own virtualenv environment
  • Install pip
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
  • Install virtualenv
$ sudo pip install virtualenv
  • Install pyenv
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
  • Append followings through $ vi ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
  • Install python 2.7.13 in pyenv (python 3.6 also tested)
$ pyenv install 2.7.13


* In case of "no acceptable C compiler found in $PATH" error happens while building python

$ sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev


bbgo Environment


  • Activate virtualenv
$ pyenv virtualenv 2.7.13 bbgo
$ pyenv activate bbgo
  • Download source from github
(bbgo)$ git clone git@github.com:genonfire/bbgo.git
  • checkout bbgo 1.0
(bbgo)$ git checkout -b 1.x
  • Install necessary packages using requirements.txt
(bbgo) $ pip install -r requirements.txt
  • In case of install packages NOT USING requirement.txt
(bbgo) $ pip install Django django-summernote django-rosetta django-fernet-fields django-statici18n psycopg2 Pillow
  • Install PostgreSQL
$ sudo apt-get install postgresql postgresql-server-dev-9.3 libpq-dev
  • Setting Database
$ sudo su postgres
$ create user bbgo
$ psql
postgres=# alter user bbgo with password 'bbgo';
postgres=# create database bbgo owner bbgo;


Settings


  • Create superuser
(bbgo)$ python manage.py createsuperuser
  • Migrate database
(bbgo)$ python manage.py migrate
  • Run localserver in debug mode
(bbgo)$ ./runlocalserver
비추 공유
댓글 [ 0 ]