Installation

Setup python 3.6.1

At first, please install python 3.6.1. It’s recommended to use pyenv.

# install pyenv
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash

# add pyenv to your path
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

# or edit path in your .profile
echo 'export PATH="~/.pyenv/bin:$PATH"' >> ~/.profile
source ~/.profile

# update pyenv
pyenv update

# before install python 3.6.1, please install these packages if you are using linux.
## debian-based distribution
apt-get install git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev

## yum-based distribution
yum install gcc bzip2 bzip2-devel openssl openssl-devel readline readline-devel

# install and setup 3.6.1 as your default
pyenv install 3.6.1
pyenv global 3.6.1
pyenv rehash

If you can see python version is 3.6.1, then setup of python is done.

python --version
> Python 3.6.1

Then add packagecloud private repository url as pip extra index.

Add the following setting into the pip config, ex. ${VIRTUAL_ENV}/pip.conf

[global]
extra-index-url=https://<READ_TOKEN>:@packagecloud.io/abeja/bizlab/pypi/simple

(Please ask Ansel for the <READ_TOKEN>)

Update settings to improve performance

# If you are using OSX, command below may make performance better.
scutil --set HostName $(scutil --get LocalHostName)

Next, please install dsf_core, io_tools and basic calculation modules.

Basic calculation modules

  • common
  • df
  • math
  • stats
  • str

If you want more advanced calculation modules like graph, nlp or kv, please install them by your self.

# all dependencies can be installed automatically.
pip install --upgrade abeja_dsf_core
pip install --upgrade abeja_dsf_io_tools
pip install --upgrade abeja_dsf_opkg_common
pip install --upgrade abeja_dsf_opkg_df
pip install --upgrade abeja_dsf_opkg_math
pip install --upgrade abeja_dsf_opkg_stats
pip install --upgrade abeja_dsf_opkg_str

Alternatively, if you would like to construct a more stable environment, you can stick on the dependency package version by specification.

pip install --upgrade abeja_dsf_core==1.5.5
pip install --upgrade abeja_dsf_io_tools==0.3.6
pip install --upgrade abeja_dsf_opkg_common==0.2.1
pip install --upgrade abeja_dsf_opkg_df==0.3.5
pip install --upgrade abeja_dsf_opkg_math==0.5.1
pip install --upgrade abeja_dsf_opkg_stats==0.3.1
pip install --upgrade abeja_dsf_opkg_str==0.2.1

DSF was set up completely.

Try DSF with next document!