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.
Roughly, I understood that I would make brew and install it with Anaconda, pip, etc. on it.
-** 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.
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
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.
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.
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