Here is a memo for building a development environment in Python in case you buy a new macPC.
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.
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).
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.
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
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.
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",
}
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