Create a Python environment

Work memo The working environment is Ubuntu 14.04

Installation

Use the installer of the following project https://github.com/yyuu/pyenv-installer

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

At the end, the following message appeared, so describe it in bash_profile as it is.

# Load pyenv automatically by adding
# the following to ~/.bash_profile:

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Read

source .bashrc

The plugins contained the following:

pyenv-doctor
pyenv-installer
pyenv-pip-rehash
pyenv-update
pyenv-virtualenv
pyenv-which-ext
python-build

Try installing Python 3 series

$ pyenv install 3.4.3
Downloading Python-3.4.3.tgz...
-> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
Installing Python-3.4.3...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
Installed Python-3.4.3 to /home/user/.pyenv/versions/3.4.3

Install lib that seems to be insufficient because it has become

sudo apt-get install libsqlite3-dev
sudo apt-get install bzip2 libbz2-dev
sudo apt-get install libssl-dev openssl
sudo apt-get install libreadline6 libreadline6-dev

This time, I was able to confirm that it was installed properly and installed as follows.

$ pyenv versions
* system 
  3.4.3

Use different versions

https://github.com/yyuu/pyenv-virtualenv

pyenv virtualenv 2.7.7 my-virtual-env-2.7.7

Recommended Posts

Create a Python environment
Create a Python environment on Mac (2017/4)
Create a virtual environment with Python!
Create a python environment on centos
Create a Python module
Create a python environment on your Mac
Let's create a virtual environment for Python
[Python] Create a virtual environment with Anaconda
[Python] Create a Batch environment using AWS-CDK
Create a Vim + Python test environment in 1 minute
Create a Wox plugin (Python)
How to create a Python virtual environment (venv)
Create a function in Python
Create a dictionary in Python
Create a virtual environment with conda in Python
Create a python3 build environment with Sublime Text3
Building a Python virtual environment
Create a python numpy array
[Venv] Create a python virtual environment on Ubuntu
Build a Python environment offline
Create a directory with python
Building a Python virtual environment
Create a Python execution environment on IBM i
[Docker] Create a jupyterLab (python) environment in 3 minutes!
Create a Python virtual development environment on Windows
Create a comfortable Python 3 (Anaconda) development environment on windows
Create a python development environment with vagrant + ansible + fabric
Create a decent shell and python environment on Windows
Create a Python development environment on OS X Lion
Building a Python environment on Mac
Create a python GUI using tkinter
Create a DI Container in Python
Building a Python environment on Ubuntu
Create a binary file in Python
Building a virtual environment with Python 3
Create a Linux environment on Windows 10
Create a Python general-purpose decorator framework
Create a Kubernetes Operator in Python
5 Ways to Create a Python Chatbot
Build a python3 environment on CentOS7
Create a random string in Python
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
Python environment construction
python environment settings
python windows environment
python environment construction
Python --Environment construction
Create a simple Python development environment with VSCode & Docker Desktop
Python environment construction
python environment construction
Create a virtual environment for python on mac [Very easy]
[Pyenv] Building a python environment with ubuntu 16.04
Create a Python function decorator with Class
Building a Python3 environment with Amazon Linux2
Create a new Python numerical calculation project
Build a blockchain with Python ① Create a class
Build a python environment on MacOS (Catallina)
Create a simple GUI app in Python
Let's create a free group with Python
Create a JSON object mapper in Python
Building a Python 3.6 environment with Windows + PowerShell