Environnement: Ubuntu 16.04.2 LTS
Créez un environnement à l'aide de pyenv + Anaconda.
% sudo apt-get install -y make build-essential \
libssl-dev zlib1g-dev libbz2-dev wget curl llvm \
libncurses5-dev libncursesw5-dev libpng-dev
% git clone git://github.com/yyuu/pyenv.git ~/.pyenv
% git clone https://github.com/yyuu/pyenv-pip-rehash.git ~/.pyenv/plugins/pyenv-pip-rehash
% echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
% echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
% echo 'eval "$(pyenv init -)"' >> ~/.bashrc
% source ~/.bashrc
% pyenv install anaconda3-4.3.1
% pyenv global anaconda3-4.3.1
% echo 'export PATH="$PYENV_ROOT/versions/anaconda3-4.3.1/bin:$PATH"' >> ~/.bashrc
% source ~/.bashrc
% python --version
Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
% conda create -n py27con python=2.7 anaconda
% source activate py27con
$ python --version
Python 2.7.13 :: Anaconda 4.3.1 (64bit)
$ source deactivate
% conda update -y conda
% pip install --upgrade pip
% pip install keras
% sudo apt-get -y install libmecab-dev mecab mecab-ipadic mecab-ipadic-utf8
% pip install mecab-python3
% pip install gensim
Recommended Posts