[PYTHON] [Memo] Build a virtual environment with Pyenv + anaconda

environment

Ubuntu18.04

Install Pyenv

$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv

Next, add the path to .bashrc (in the case of profile, that is OK, but you should check the bash related relationships)

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc

Apply changes by reloading .bashrc

$ sourec ~/.bashrc

Install anaconda on Pyenv

Install anaconda using pyenv (any version you like)

$ pyenv install anaconda3-5.3.1

Move to the directory where you want to use the anaconda you just installed, and specify the distribution to be used in the directory with pyenv as anaconda.

$ cd ~/<YOUR_DIR_PATH>
$ pyenv local anaconda3-5.3.1

Build a virtual environment with anaconda

Build a virtual environment with the conda command

$ conda create -n <ENV_NAME>

Activate the created virtual environment

$ conda activate <ENV_NAME>

If you want to use the conda command or pip,

$ conda install pip

After doing

$ conda install <PACKAGE_NAME>
# or
$ pip install <PACKAGE_NAME>

Note that the package names are often different between conda and pip!

Recommended Posts

[Memo] Build a virtual environment with Pyenv + anaconda
Build a python virtual environment with pyenv
Build a virtual environment with pyenv and venv
Create a virtual environment with Anaconda installed via Pyenv
[Python] Create a virtual environment with Anaconda
Build a simple Python virtual environment without pyenv
Flow of creating a virtual environment with Anaconda
Build an Anaconda virtual environment
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a python virtual environment with virtualenv and virtualenvwrapper
Notes on creating a virtual environment with Anaconda Navigator
Build a Django environment for Win10 (with virtual space)
Build a numerical calculation environment with pyenv and miniconda3
Build python virtual environment with virtualenv
Building a virtual environment with Python 3
Build a python environment with pyenv (OS X El Capitan 10.11.3)
Build a Python environment with WSL + Pyenv + Jupyter + VS Code
[Pyenv] Building a python environment with ubuntu 16.04
Build a Tensorflow environment with Raspberry Pi [2020]
Build a Fast API environment with docker-compose
Create a virtual environment with Python_Mac version
Build Python environment with Anaconda on Mac
[Linux] Build a jenkins environment with Docker
A memo packed with RADEX environment construction
Creating a virtual environment in an Anaconda environment
Build a modern Python environment with Neovim
[Linux] Build a Docker environment with Amazon Linux 2
Build a Python environment on your Mac with Anaconda and PyCharm
Build a C language development environment with a container
For beginners to build an Anaconda environment. (Memo)
Build a WardPress environment on AWS with pulumi
Build a python environment with ansible on centos6
Building an Anaconda environment for Python with pyenv
Building a Python environment with WLS2 + Anaconda + PyCharm
How about creating a virtual environment with Anaconda and doing pip install?
Start Django in a virtual environment with Pipenv
A memo that allows you to change Pineapple's Python environment with pyenv
Create a virtual environment with conda in Python
[Python] Build a Django development environment with Docker
Create a python3 build environment with Sublime Text3
Build a Django environment with Vagrant in 5 minutes
A memo when creating a python environment with miniconda
Build a Django development environment with Doker Toolbox
Work in a virtual environment with Python virtualenv.
Build a Python environment with OSX El capitan
Build python3.x with pyenv
Anaconda environment construction memo
Quickly build a Python Django environment with IntelliJ
Build a Python virtual environment that anyone can understand September 2016 (pyenv + virutalenv)
From Python environment construction to virtual environment construction with anaconda
Virtual environment with Python 3.6
Build a Python machine learning environment with a container
Build a python execution environment with VS Code
Steps to build a Django environment with Win10 WSL Ubuntu18.04 + Anaconda + Apache2
Use anaconda virtual environment with Zsh (problem fix)
A memo to create a virtual environment (venv) before Django
Building a Python environment for pyenv, pyenv-virtualenv, Anaconda (Miniconda)
Build a python environment for each directory with pyenv-virtualenv
Build a Python virtual environment using venv (Django + MySQL ①)
Build a Python environment on your Mac using pyenv
Build a machine learning application development environment with Python