Building a Python environment on Ubuntu

Python environment construction

Environment: Ubuntu 16.04.2 LTS

Build an environment using pyenv + Anaconda.

Package installation

% sudo apt-get install -y make build-essential \
  libssl-dev zlib1g-dev libbz2-dev wget curl llvm \
  libncurses5-dev libncursesw5-dev libpng-dev

Install pyenv and plugins

% 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

Anaconda installation

% 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)

Introduction of Python2 environment

% conda create -n py27con python=2.7 anaconda
% source activate py27con
$ python --version
Python 2.7.13 :: Anaconda 4.3.1 (64bit)
$ source deactivate

Library installation

% conda update -y conda
% pip install --upgrade pip

keras installation

% pip install keras

MeCab installation

% sudo apt-get -y install libmecab-dev mecab mecab-ipadic mecab-ipadic-utf8
% pip install mecab-python3	

Gensim installation

% pip install gensim

Recommended Posts

Building a Python environment on Ubuntu
Building a Python environment on Mac
[Pyenv] Building a python environment with ubuntu 16.04
Until building a Python development environment using pyenv on Ubuntu 20.04
Building a Python virtual environment
Building a Python virtual environment
[Venv] Create a python virtual environment on Ubuntu
Building a Python environment on a Sakura VPS server
Prepare Python development environment on Ubuntu
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Create a Python environment on Mac (2017/4)
I made a Python3 environment on Ubuntu with direnv.
Building a virtual environment with Python 3
Create a python environment on centos
Procedure for building a CDK environment on Windows (Python)
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Build a python3 environment on CentOS7
OpenCV3 & Python3 environment construction on Ubuntu
How to build a new python virtual environment on Ubuntu
Building a Python environment on a Mac and using Jupyter lab
Building a Python3 environment with Amazon Linux2
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
Python virtual environment and packages on Ubuntu
Create a python environment on your Mac
Building a LaTeX environment on Chrome OS
Building a Python 3.6 environment with Windows + PowerShell
Steps to install Python environment on Ubuntu
[Mac] Building a virtual environment for Python
Creating a python virtual environment on Windows
Created Ubuntu, Python, OpenCV environment on Docker
Build a Python + OpenCV environment on Cloud9
Building a Python development environment for AI development
build Python on Ubuntu
Create a Python environment
Install Python 3.3 on Ubuntu 12.04
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
Everything from building a Python environment to running it on Windows
Ubuntu18.04.05 Creating a python virtual environment in LTS
Build python environment with pyenv on EC2 (ubuntu)
Building a python environment with virtualenv and direnv
Simply build a Python 3 execution environment on Windows
Install python package in personal environment on Ubuntu
Build a python environment with ansible on centos6
Building a Python environment with WLS2 + Anaconda + PyCharm
Build a Python environment on Mac (Mountain Lion)
Build a Python development environment on your Mac
[Python] Web development preparation (building a virtual environment)
Think about building a Python 3 environment in a Mac environment
Build a Kubernetes environment for development on Ubuntu
Set up a Python development environment on Marvericks
Create a Python execution environment on IBM i
Create a Python virtual development environment on Windows
Build a Python development environment on Raspberry Pi
Set up Python 3.4 on Ubuntu
Use matplotlib on Ubuntu 12 & Python
Put Python 3.x on Ubuntu
Build python3 environment with ubuntu 16.04
Build Python environment on Windows
Install OpenCV on Ubuntu + python