Machine learning environment construction macbook 2021

This article

A memorandum when creating an environment for ML on macbook

Will be updated from time to time

Environment construction procedure

Finder

Show the following in a new Finder window: Change the display item of to Drive.

image.png

image.png

About installing Notion. For multi-user, under the user directory Place in the Application directory

Permission setting

Since it is basically used by multiple users, give it permission.

(I often forget this and have trouble)

$ sudo chown -R $(whoami):admin /usr/local/*
$ sudo chmod -R g+w /usr/local/*

Initial settings that you definitely want to do when you buy a Mac-Qiita

use zsh

The default from now on is zsh. If it's still bash, leave it in zsh.

chsh -s /bin/zsh
echo $SHELL
cat /etc/shells

zsh-autosuggestions/INSTALL.md at master · zsh-users/zsh-autosuggestions


git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

# .Added to zshrc
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

Terminal environment

Use fish for completion and starship for the theme However, it is not set as the default shell.


# terminal
brew install fish
brew install startship
echo 'starship init fish | source' >> ~/.config/fish/config.fish
echo 'alias c="clear"' >> ~/.config/fish/config.fish

Other

#Got cat
brew install bat

Python

#Below is the fish environment
fish

#shell is zsh
echo $SHELL
# /bin/zsh

# pyenv
brew install pyenv

#Add pyenv defaults to fish config file
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc

#Reload fish
exec fish

pyenv install 3.7.9
pyenv global 3.7.9
pyenv rehash
pyenv version

which python3
python3 -V
which pip3

# pipenv
pip3 install --upgrade pip
pip3 install pipenv

pipenv install pandas numpy sklearn tqdm seaborn matplotlib japanize-matplotlib
pipenv install --dev autopep8 yapf isort
pipenv install --dev jupyter
pipenv install --dev jupyter_contrib_nbextensions
pipenv install --dev autopep8 yapf isort
pipenv run jupyter contrib nbextension install --user
pipenv run jupyter nbextension enable code_prettify/autopep8
pipenv run jupyter nbextension enable codefolding/main
pipenv run jupyter nbextension enable hide_input_all/main
pipenv run jupyter nbextension enable highlight_selected_word/main
pipenv run jupyter nbextension enable code_prettify/isort
pipenv run jupyter nbextension enable scratchpad/main
pipenv run jupyter nbextension enable table_beautifier/main
pipenv run jupyter nbextension enable zenmode/main
pipenv run jupyter notebook --generate-config -y
echo 'c.NotebookApp.password="sha1:ef7a7482cc53:6ad03768dd7e9ca09cf0e98c1c7238ee923f5917"' > ~/.jupyter/jupyter_notebook_config.py


About shell

Making fish the default shell can be a hassle. Set the default to zsh and try calling fish each time.

zsh

Summary of reading order and usage tips of zsh configuration file --Qiita

zshenv> zprofile> zshrc> zlogin .zshenv As you can see from the order, it is always loaded first in any case. .zprofile It is loaded only once in the case of a login shell. .zshrc Only loaded for login and interactive shells.

For the time being. Should I write it in zshrc?

Recommended Posts

Machine learning environment construction macbook 2021
Python and machine learning environment construction (macOS)
EV3 x Pyrhon Machine Learning Part 1 Environment Construction
Build a machine learning environment
Machine learning
Python + Unity Reinforcement learning environment construction
Deep learning tutorial from environment construction
Django environment construction
Python & Machine Learning Study Memo: Environment Preparation
DeepIE3D environment construction
Emacs-based environment construction
Linux environment construction
Python environment construction
Environment construction (python)
django environment construction
python environment construction
Python --Environment construction
Python environment construction
[Memo] Machine learning
Machine learning classification
[Windows 10] "Deep Learning from scratch" environment construction
Golang environment construction
python environment construction
Creating a development environment for machine learning
Build AI / machine learning environment with Python
Machine Learning sample
Word2vec environment construction
Build a Python machine learning environment with a container
About machine learning overfitting
Environment construction: GCP + Docker
Django project environment construction
Machine learning ⑤ AdaBoost Summary
python windows environment construction
[Super Introduction] Machine learning using Python-From environment construction to implementation of simple perceptron-
Machine Learning: Supervised --AdaBoost
Go language environment construction
Machine learning logistic regression
ConoHa environment construction memo
homebrew python environment construction
PyData related environment construction
Anaconda-4.2.0-python3 environment construction (Mac)
Python development environment construction
Machine learning support vector machine
Studying Machine Learning ~ matplotlib ~
Machine learning linear regression
YOLO v4 environment construction ①
Machine learning library dlib
pyenv + fish environment construction
Machine learning (TensorFlow) + Lotto 6
python2.7 development environment construction
Somehow learn machine learning
BigGorilla environment construction memo
grip environment construction onCentOS6.5
Anaconda environment construction memo
Golang environment construction [goenv]
Mac environment construction Python
Pyxel environment construction (Mac)
Machine learning library Shogun
Machine learning rabbit challenge
Python environment construction @ Win7
Introduction to machine learning