[PYTHON] Environment construction memo of pyenv + conda

Introduction

If you install anaconda directly, it seems that it will collide with Homebrew, so I built anaconda environment with pyenv + conda.

Installation method (pyenv installed state)

Search for installable anaconda

pyenv install -l | grep anaconda

Installation

pyenv install anaconda3-2020.07

How to create a virtual environment with conda

Switch anaconda to global

pyenv global anaconda3-2020.07

Creating a virtual environment

conda create -n [Virtual environment name] python=[python version] [Library you want to install] [Library you want to install] ...

Enable virtual environment created only in the working directory

mkdir test_conda
cd test_conda
pyenv local [Virtual environment name] #In the directory.python-A file called version is generated.
#When you exit the directory,Return to global-enabled environment

Start the created virtual environment with activate (specify the full path)

conda activate [Virtual environment name]

#You can also run the file directly in source
source $PYENV_ROOT/versions/anaconda3-2020.07/bin/activate [Virtual environment name]

Stopping the running virtual environment


conda deactivate

Other commands

Library installation


conda install [Library name]

View installed libraries


conda list

Delete virtual environment


conda remove -n [Virtual environment name] --all

reference

Recommended Posts

Environment construction memo of pyenv + conda
[Memo] Construction of cygwin environment
Operation memo of Conda virtual environment
ConoHa environment construction memo
pyenv + fish environment construction
BigGorilla environment construction memo
Anaconda environment construction memo
Django development environment construction memo
Anaconda3 × Pycharm environment construction memo
[MEMO] [Development environment construction] Python
Environment construction of python2 & 3 (OSX)
[MEMO] [Development environment construction] wine
Environment construction of python and opencv
Python environment construction memo on Windows 10
Start of self-made OS 1. Environment construction
[Django] Memorandum of environment construction procedure
pyenv memo
Easy usage memo of Anaconda (conda)
Python environment construction memo on Mac
Memo of python + numpy/scipy/pandas/matplotlib/jupyterlab environment construction on M1 macOS (as of 2020/12/24)
Python environment construction (pyenv, anaconda, tensorflow)
Star Cluster environment construction work memo
Python environment construction (pyenv + poetry + pipx)
[MEMO] [Development environment construction] Jupyter Notebook
Environment construction of python3.8 on mac
Memo of Linux environment construction using VirtualBox + Vagrant on Windows 10
Emacs Python development environment construction memo
Ubuntu Desktop 20.04 development environment construction memo
Environment construction of "Tello_Video" on Ubuntu
Environment construction with pyenv and pyenv-virtualenv
Construction of Python local development environment Part 1 (pyenv, pyenv-virtualenv, pip installation)
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
Mac OS X development environment construction memo
Construction of development environment for Choreonoid class
A memo packed with RADEX environment construction
Django environment construction
DeepIE3D environment construction
Linux environment construction
Python environment construction
Environment construction (python)
django environment construction
CodeIgniter environment construction
python environment construction
Python --Environment construction
Python environment construction
OpenLDAP construction memo
Golang environment construction
python environment construction
Word2vec environment construction
Python3 TensorFlow environment construction (Mac and pyenv virtualenv)
Use multiple versions of python environment with pyenv
Installation of Python3 and Flask [Environment construction summary]
[Memo] Build a virtual environment with Pyenv + anaconda
Poetry-virtualenv environment construction with python of centos-sclo-rh ~ Notes
python development environment -use of pyenv and virtualenv-
Python 3.x environment construction by Pyenv (CentOS, Ubuntu)
Ubuntu 16.04 LTS, beginner memorandum of environment construction to switch anaconda version with pyenv
My python environment memo
Environment construction: GCP + Docker
Django project environment construction
Recommendation of building a portable Python environment with conda