For beginners to build an Anaconda environment. (Memo)

Purpose

I want to deepen my understanding of environment construction. (Because it was difficult to build the environment again)

I used to use Homebrew until now, but it's a hassle to install the necessary libraries each time, so I thought I'd like to use a platform that has been put together.

Understanding so far

Roughly, I understood that I would make brew and install it with Anaconda, pip, etc. on it.

What are Homebrew, pip, Anaconda, pyenv, venv?

-** Homebrew **: ** Package manager that manages software deployments on Mac OS X operating systems. I understand that this is the ** best foundation **.

-** pyenv **: Python version control. Install Python through pyenv for easy switching. Details are below. "Building a virtual environment that even beginners can understand" https://qiita.com/Taka20200105/items/20cebb42a20301203d2e

-** pip **: ** Python package manager **. Packages are usually installed using the pip command. (It's like a gem in Ruby.)

-** Anaconda **: A platform that provides Python packages for data science in addition to Python itself. Download it from the dedicated repository managed and operated by Anaconda with the Conda command, and install it in the Conda environment. --In standard Python, the virtual environment is managed by the venv module, but in Anaconda, the virtual environment is also provided by the Conda command.

Anaconda environment construction

Homebrew and pyenv are already installed, so they are omitted.

pyenv global ensures that all directories run the corresponding version.


#Installation of Anaconda
% pyenv install Anaconda3-2019.10
Downloading Anaconda3-2019.10-MacOSX-x86_64.sh...
-> https://repo.continuum.io/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
Installing Anaconda3-2019.10-MacOSX-x86_64...
Installed Anaconda3-2019.10-MacOSX-x86_64 to /Users/.pyenv/versions/Anaconda3-2019.10

#Version switching
% pyenv global Anaconda3-2019.10
% pyenv versions
  system
  3.8.0
* Anaconda3-2019.10 (set by /Users/uemura/.pyenv/version)
% pyenv global 3.8.0             
uemura@uemuratntonoAir python_machine_learnig % pyenv versions    
  system
* 3.8.0 (set by /Users/uemura/.pyenv/version)
  Anaconda3-2019.10

#Version change must always do pyenv rehash.
#Can I save my changes?
% pyenv rehash
#Verification
% python -V   
Python 3.8.0

Impressions

I built Homebrew and installed it on it, but I was able to organize how to set up pyenv and Anaconda. With this arrangement, understanding has progressed, and the current environment construction has cleared up.

  1. Homebrew build ⇨ Install Python with pyenv ⇨ Build virtual environment with venv ⇨ Add library and execute Python.
  2. Homebrew build ⇨ Install ** Anaconda ** with pyenv. This method is very convenient because you can install the library + Python at once.

On the other hand, there was a lot of information that Homebrew and Anaconda were very incompatible. When installing Anaconda, be sure to install it with pyenv.

Let's use Anaconda.

References

Notes from installing Homebrew to building an Anaconda environment for Python with pyenv 「https://qiita.com/aical/items/2d066801a7464a676994」

python Japan 「https://www.python.jp/install/anaconda/index.html」

Recommended Posts

For beginners to build an Anaconda environment. (Memo)
Build an Anaconda virtual environment
Created an environment for Anaconda & Jupyter
Build an environment for Blender built-in Python
[Sakura Rental Server] (For beginners) How to build an environment for Python, pyenv, and Flask. | For csh
Memo # 4 for Python beginners to read "Detailed Python Grammar"
An introduction to object-oriented programming for beginners by beginners
Building an Anaconda environment for Python with pyenv
Memo # 3 for Python beginners to read "Detailed Python Grammar"
[For beginners] What to do after installing Anaconda
Memo # 1 for Python beginners to read "Detailed Python Grammar"
[Memo] Build a virtual environment with Pyenv + anaconda
Memo # 2 for Python beginners to read "Detailed Python Grammar"
Memo # 7 for Python beginners to read "Detailed Python Grammar"
Anaconda environment construction memo
Memo # 6 for Python beginners to read "Detailed Python Grammar"
[For beginners] How to study programming Private memo
Memo # 5 for Python beginners to read "Detailed Python Grammar"
How to build an environment when you want to use python2.7 after installing Anaconda3
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
How to build an environment for using multiple versions of Python on Mac
Build an interactive environment for machine learning in Python
[Linux] WSL2 Build an environment for laravel7 with Ubuntu 20.04
[For beginners] Install the package in the Anaconda environment (Janome)
How to build a development environment for TensorFlow (1.0.0) (Mac)
Anaconda3 × Pycharm environment construction memo
Python3 environment construction (for beginners)
~ Tips for beginners to Python ③ ~
I tried to build an environment for machine learning with Python (Mac OS X)
Build an environment for machine learning using Python on MacOSX
Add an extension to build a more comfortable Jupyter environment
[Memo] Build a development environment for Django + Nuxt.js with Docker
Introducing Kaggle's Docker Image on Windows to build an environment
[Django] Memo to create an environment of Django + MySQL + Vue.js [Python]
An introduction to Mercurial for non-engineers
Django beginners tried building an environment
[For beginners] Django -Development environment construction-
An introduction to Python for non-engineers
Anyone can understand how to build an initial environment for Python on Mac September 2016 (pyenv + virutalenv)
Building a virtual environment for Mayavi dedicated to Python 3.6, Anaconda, Spyder users
Change Python 64bit environment to 32bit environment with Anaconda
Method to build Python environment in Xcode 6
How to build a sphinx translation environment
Memo to ask for KPI with python
Programming environment for beginners made on Windows
[5 steps] Apply anaconda virtual environment to VScode
How to create an NVIDIA Docker environment
An introduction to OpenCV for machine learning
I created an Anaconda environment using Docker!
I want to build a Python environment
Build an LNPP environment on Amazon Linux 2
Try to build python and anaconda environment on Mac (by pyenv, conda)
Build Python environment with Anaconda on Mac
Build an environment to execute C ++ functions from Python with Pybind11 (for Windows & Visual Studio Code people)
Beginners read "Introduction to TensorFlow 2.0 for Experts"
An introduction to Python for machine learning
How to add python module to anaconda environment
Creating a virtual environment in an Anaconda environment
Building an environment for "Tello_Video" on Raspbian
Steps to build a Django environment with Win10 WSL Ubuntu18.04 + Anaconda + Apache2
Building an environment for "Tello_Video" on Windows