How to install python using anaconda

Since python can be easily installed by using anaconda, the procedure is described. By creating a virtual environment with anaconda, it is possible to use multiple environments such as python2 and python3.

environment

CentOS 6.8

Install pyenv

Bring pyenv from git.

$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ source ~/.bashrc

Installation of anaconda

Check the version of anaconda that can be installed

$ pyenv install -l | grep anaconda

anaconda2-x.x.x is python2 series, anaconda3-x.x.x is compatible with python3 series.

Installation of anaconda

This time, install the latest version of anaconda2-4.0.0 on July 3, 2016 on pyhon2 series.

$ pyenv install anaconda2-4.0.0
$ pyenv rehash
$ pyenv global anaconda2-4.0.0

update conda

$ conda update conda

Use of virtual environment

Building a virtual environment

To build a new virtual environment, execute the following command. conda create -n python =

In particular,

$ conda create -n test1 python=2.7 numpy matplotlib scipy pandas jupyter

And. If you want to use the pyhon3 system environment, install anaconda3 by the same procedure and install anaconda3. Just create an environment with conda

Checking the virtual environment

$ conda env list

Or

$ conda info -e

Applying virtual environment

To apply the environment name test1, execute the following command

$ source PYENV_ROOT/versions/anaconda2-4.0.0/bin/activate test1

If you exit,

$ source deactivate

that's all

Recommended Posts

How to install python using anaconda
How to install Python
How to install python
[2020.8 latest] How to install Python
How to install Python [Windows]
[Python] How to install OpenCV on Anaconda [Windows]
How to install Anaconda with pyenv
How to install and use pandas_datareader [Python]
python3 How to install an external module
[Kivy] How to install Kivy on Windows [Python]
How to install a package using a repository
How to add python module to anaconda environment
How to install python3 with docker centos
How to install pip
How to install archlinux
How to install BayesOpt
How to install Nbextensions
How to install Prover9
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
[2020 version] How to install Python3 on AWS EC2
How to install OpenCV on Jetson Nano Python
How to install Python for pharmaceutical company researchers
How to install / verify graphviz on anaconda / windows10
[CentOS7] Install anaconda using pyenv
python3: How to use bottle (2)
Install Python environment with Anaconda
Tabpy 1.0 (2020-01 version) How to install
[Python] How to use list 1
How to update Python Tkinter to 8.6
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
Post to Twitter using Python
How to use Python argparse
Start to Selenium using python
How to install mkl numpy
Python: How to use pydub
[Python] How to use checkio
How to run Notepad ++ Python
How to change Python version
How to install Pelican blog
How to develop in Python
[python] How to judge scalar
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
How to set up a Python environment using pyenv
How to auto-submit Microsoft Forms using python (Mac version)
How to make a Python package using VS Code
How to exit when using Python in Terminal (Mac)
How to retrieve multiple arrays using slice in python.
[Introduction to Python] How to stop the loop using break?
How to execute a command using subprocess in Python
[Introduction to Python] How to write repetitive statements using for statements
How to write a Python class
[Python] How to FFT mp3 data
[Python] How to do PCA in Python
Python: How to use async with
How to install NPI + send a message to line with python
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)