Initial setting of Mac ~ Python (pyenv) installation is the fastest

table of contents

  1. Purpose
  2. Environment
  3. Various settings / installation
    3.1 Trackpad settings
    3.2 Keyboard settings
    3.3 dock settings
    3.4 Display settings
    3.5 Sound effect settings
    3.6 Introduced karabiner
    3.7 clipy installation 3.8 chrome installation
    3.9 iterm2 installation / configuration
    3.10 Homebrew installation
    3.11 pyenv installation
    3.12 vscode installation
  4. At the end

1. Purpose

The failed Mac was initialized and returned, so I built a python environment. At the same time, we changed the default settings on the Mac. I will keep a memorandum of the various settings and installation procedures that were performed at that time.

2. Environment

3. Various settings

3.1 Trackpad settings

First, change the trackpad settings because the pointer is slow and stressful. Since I want to enable "drag with 3 fingers", I set swipe etc. to operate with basic 4 fingers.

--Trackpad Settings (System Preferences> Trackpad) --Pointer and click --Startup speed: Fast --Examine & Data Detection: Tap with 3 fingers --Tap to click: Tap with one finger --Other gestures --Swipe between pages: uncheck --Mission Control: Swipe left or right with four fingers --Application Expose: Swipe down with four fingers --Three-finger drag settings (System Preferences> Trackpad) --Pointer Control> Trackpad Options --Enable dragging: Three-finger drag

3.2 Keyboard settings

Since the key repeat is slow, shorten it. At the same time, add Japanese to the keyboard input.

--Keyboard settings (system settings> keyboard) --Keyboard --Key repeat: Fast --Time to repeat input recognition: Fast --Input source --Added Japanese

3.3 Dock settings

Change the Dock so that it is not always visible. At the same time, the apps registered by default are rarely used, so delete them from the dock except for the finder.

--Dock Settings (System Preferences> Dock) --Automatically show / hide Dock: Check --Make the window an application icon: uncheck

3.4 Sound effect settings

When you delete a file etc., the sound effect is emitted one by one and it is stressful, so do not make the sound effect.

--Sound effect settings (System Preferences> Sound) --Sound effects --Play user interface sound effects: uncheck

3.5 Display settings

In the initial state, it takes a short time to turn off the display (certainly 5 minutes), so extend it. I set it to 30 minutes.

--Display settings (system settings> energy saving) --Time to turn off the display: 20 minutes --Sleep hard disk as much as possible: uncheck

3.6 Introduced karaniner

Switching to Japanese input on the US board is a bit annoying by default, so install karabiner early. Please refer to this site.

-How to switch Japanese input with "Karabiner" using US keyboard on Mac

3.7 clipy installation

clipy is a very easy-to-use app that allows you to keep a history of your clipboard. Highly recommended for those who are not using it. Install by referring to the following site.

-[MAC] Downloading and using Clipy [Time saving for work]

3.8 Installing Chrome

I like this one, but I love Chrome so I will install it. https://www.google.com/chrome/

3.9 iterm2 installation shell change

iterm2 hotkey is extremely convenient and I want to use it, so install it. Install and make various settings by referring to the following site.

-Recommended settings for iTerm2-Efficient terminal work- -It's a waste not to use iTerm2 Hotkey! !!

Then change the shell to zsh. Since becoming Catalina, it is possible to switch to zsh with a single ?? command.

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

Next, set the prompt. I like it, but I've changed it to look like this:

--Insert a line break after executing the command --Display time --Green current directory スクリーンショット 2020-11-24 22.25.12.png

Create a .zshrc and write the following:

.zshrc


# prompt
PROMPT='
%*
%F{green}[%~]%f %# '

Also, I personally want to do ls at the same time as cd, so write the function as follows and paste the alias.

.zshrc


# cdls
function cdls() {
  \cd "$@" && ls
}
alias cd=cdls

3.10 Homebrew installation

Install Homebrew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

3.11 Install pyenv

Install pyenv.

brew install pyenv

Write the following in .zshrc.

.zshrc


export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

Install python using pyenv.

pyenv install 3.7.5

3.12 VScode installation

Installing python takes time, so install vscode in the meantime. Please refer to the following site.

-Procedure to install Visual Studio Code on MacOS

4. At the end

The python environment is now ready. It took less than an hour, depending on the environment. I also installed AWS SDK and GCP SDK, but for the time being, I did not describe it because it is a summary of the minimum python environment. For the various installation parts, I fully referred to other sites. Thank you very much.

reference

How to switch Japanese input with "Karabiner" using US keyboard on Mac [MAC] Downloading and using Clipy [Time saving for work] Recommended settings for iTerm2-Efficient terminal work- It's a waste not to use iTerm2 Hotkey! !! Procedure to install Visual Studio Code on MacOS

Recommended Posts

Initial setting of Mac ~ Python (pyenv) installation is the fastest
[python] [meta] Is the type of python a type?
In search of the fastest FizzBuzz in Python
Installation method using the pip command of the Python package (library) Mac environment
The answer of "1/2" is different between python2 and 3
This is the only basic review of Python ~ 1 ~
This is the only basic review of Python ~ 2 ~
This is the only basic review of Python ~ 3 ~
the zen of Python
Installation of Python 3.3 rc1
Installation of matplotlib (Python 3.3.2)
Around the installation of the Python project management framework Trac
Why is the first argument of [Python] Class self?
python (pyenv + pyenv-virtualenv) + CentOS7 installation
Towards the retirement of Python2
About the ease of Python
Python installation (Mac edition) (old)
Handling of python on mac
[Python] numpy.empty initial value setting
Python 3 series installation for mac
[Python] PyCharm environment settings (installation, interpreter settings, addition of packages) Mac environment
What is the default TLS version of the python requests module?
About the features of Python
Source installation and installation of Python
The Power of Pandas: Python
(One of the solutions) when pyenv install on macOS causes BUILD FAILED and Python installation fails.
Python: Update pyenv without thinking and solve the "where is Python?" Phenomenon
March 14th is Pi Day. The story of calculating pi with python
Construction of Python local development environment Part 1 (pyenv, pyenv-virtualenv, pip installation)
Using multiple versions of Python on Mac OS X (1) Multiple Ver installation
Ansible playbook for setting up Python preferences using pyenv on Mac
The story of Python and the story of NaN
Raise the version of pyenv itself
Installation of SciPy and matplotlib (Python)
[Python] The stumbling block of import
First Python 3 ~ The beginning of repetition ~
Is the probability of precipitation correct?
Installation of scikit-learn (Mac OS X)
Existence from the viewpoint of Python
pyenv-change the python version of virtualenv
Python memo Anaconda installation (Mac only)
[python] What is the sorted key?
[Python] Understanding the potential_field_planning of Python Robotics
Installation of Python, SciPy, matplotlib (Windows)
Review of the basics of Python (FizzBuzz)
Environment construction of python3.8 on mac
What is the python underscore (_) for?
If Python 3.5.0 installation fails on Mac
Science "Is Saito the representative of Saito?"
About the basics list of Python basics
Learn the basics of Python ① Beginners
[Python] What is a formal argument? How to set the initial value
What is the XX file at the root of a popular Python project?
[Example of Python improvement] What is the recommended learning site for Python beginners?
[Mac] Build a Python 3.x environment at the fastest speed using Docker
What kind of book is the best-selling "Python Crash Course" in the world?
Find out the name of the method that called it from the method that is python
[Introduction to Python] What is the method of repeating with the continue statement?
What is the fastest way to create a reverse dictionary in python?
Change the length of Python csv strings
Check the behavior of destructor in Python