I remember building my ubuntu 16.04 python environment. There is nothing new in particular.
Reference: Set up python and machine learning library on Ubuntu Reference: Python 3.x environment construction by Pyenv (CentOS, Ubuntu)
sudo apt-get install gcc g++ make git openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install 3.5.1
pyenv rehash
pyenv global 3.5.1
mkdir ~/workPython3
~/workPython3$ pyenv virtualenv 3.5.1 3.5.1_work
~/workPython3$ pyenv local 3.5.1_work
(3.5.1_work) [email protected]:~/workPython3$ pip install numpy
No problem.
(3.5.1_work) [email protected]:~/workPython3$ pip install scipy
I didn't put any BLAS package here (install scipy) and got an error. I'm not sure which BLAS package is better, but I'll put openblas in for the time being.
Reference: Using BLAS on ubuntu 14.04
~$ sudo apt-get install libopenblas-dev
again.
(3.5.1_work) [email protected]:~/workPython3$ pip install scipy
There is no problem this time.
Recommended Posts