Set Up for Mac (Python)

What is this

Here is a memo for building a development environment in Python in case you buy a new macPC.

System Preferences

Confirm conversion in Japanese input once instead of twice

It has nothing to do with development, but it feels awkward, so I'll change it.

--Select "System Preferences"-> "Keyboard"-> "Input Source" from Launchpad etc. --With Japanese selected from the left side of the screen, scroll the right screen and check "Windows-like key operation". ――You may like it, but if you uncheck "Live conversion", it will not be converted without permission.

スクリーンショット 2020-09-18 17.24.06.png

Change the background color of the terminal

The default setting is black on a white background, which makes my eyes tired and uncomfortable, so I change it (generally, this is an image with many black backgrounds).

--Open a terminal from Launchpad etc. --Select "Terminal"-> "Preferences"-> "Profile" from the menu at the top left of the screen. --You can change it freely on the "Text" tab. There is also a template on the left side of the screen, so you can set it from there (if you select a template, select "Default" at the bottom of the screen).

スクリーンショット 2020-09-18 16.59.41.png

Homebrew Package management system for mac.

-Copy the command to install from the here site and execute it in the terminal (installation takes a little time). Example.

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

--Execute the following command and check if the installation is completed normally.

$ brew --version
Homebrew 2.5.

Git Version control system.

--Execute the following command to install git.

$ brew install git

--Execute the following command and check if the installation is completed normally.

$ git —-version
git version 2.28.0
$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

Python Interpretered programming language. It is often used in machine learning.

--Execute the following command.

$ brew install python3

--Confirm execution in interactive mode. You can exit interactive mode by typing ʻexit () `.

$ python3
>>> print("Hello world!")
Hello world!

ANACONDA Distribution for Python and R language for Data Scientist.

-Open the here page. ――If you scroll down the screen, you will reach the screenshot below. --Click the 64-Bit Graphical Installer (462 MB) boxed in red to download. --Click on the installed .pkg file and follow the instructions to install.

スクリーンショット 2020-09-18 17.14.19.png

pip A package management system for installing and managing packaged software written in Python.

-Check if you have / usr / bin / easy_install (usually it should be pre-installed). --Command example: ls / usr / bin / easy_install --Execute the following command.

sudo easy_install pip

--Check the execution.

$ pip --version
pip 20.2.3

Visual Studio Code (hereinafter VS Code)

An editor developed by Microsoft.

-Open here. --Click Download for Mac to download. --Extract the downloaded zip file. --Drag and drop the application written as Visual Studio Code to the application folder.

スクリーンショット 2020-09-18 17.36.36.png

About VS Code settings

Describe what you usually set when developing. --Packages to be installed in advance.

$ pip install flake8
$ pip install autopep8

--Extensions in VS Code - Python - Python for VSCode - Python Docstring Generator

{
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 1000,
    "python.linting.lintOnSave": true,
    "python.formatting.provider": "autopep8",
    "python.linting.flake8Args": [
        "--ignore=E501",
    ],
    "python.formatting.autopep8Args": [
        "--aggressive", "--aggressive",
    ],
    "autoDocstring.docstringFormat": "numpy",
}

At the end

I wrote it as a memorandum that I will never forget what I put in. If there are any omissions, I will add them as needed.

Recommended Posts

Set Up for Mac (Python)
Set up Python 3.4 on Ubuntu
Python environment construction For Mac
Python 3 series installation for mac
Set up Python environment on CentOS
Python3 TensorFlow for Mac environment construction
2016-10-30 else for Python3> for:
python [for myself]
Python set arithmetic
Solution for pip install error [Python] [Mac]
Ansible playbook for setting up Python preferences using pyenv on Mac
Python set arithmetic
Creating amateur python environment settings (for MAC)
[Mac] Building a virtual environment for Python
python on mac
Atcoder standard input set for beginners (python)
Try to set up a Vim test environment quite seriously (for Python)
Set up a simple HTTPS server in Python 3
Building an environment for executing Python scripts (for mac)
Set up a test SMTP server in Python.
Set up python Tornado environment on raspbian jessie
Set up a simple SMTP server in Python
Set up a Python development environment on Marvericks
Set up TinyGo development environment for VS Code
About Python for loops
Install Python on Mac
Install Python 3 on Mac
About Python, for ~ (range)
python textbook for beginners
Refactoring tools for Python
Set up Jetson nano
python for android Toolchain
Install Python 3.4 on Mac
Mac environment construction Python
OpenCV for Python beginners
Install Python (for Windows)
[Python] for statement error
Python environment for projects
Set up a development environment for natural language processing
Make your python CUI application an app for mac
I tried Python on Mac for the first time.
How to set up a Python environment using pyenv
Set up a simple local server on your Mac
I set up Django from scratch (Vagrant, Centos, Python3)
Summary of python environment settings for myself [mac] [ubuntu]
Tips for speeding up python code correctly with numba
Building a Python environment for programming beginners (Mac OS)
Set up a Python development environment with Sublime Text 2
[Vagrant] Set up a simple API server with python
Set a proxy for Python pip (described in pip.ini)
Set up python and machine learning libraries on Ubuntu
Data set for machine learning
Python memo (for myself): Array
IPMsg Log Converter for Mac
How to set up Ubuntu for Windows Subsystem for Linux 2 (WSL2)
About Fabric's support for Python 3
Python list, for statement, dictionary
Python for Data Analysis Chapter 4
Set up a Python development environment with Visual Studio Code
Learning flow for Python beginners
Python 3.6 installation procedure [for Windows]