As a memorandum, I will write the flow for the purpose of creating a slackbot using python on windows. First, install Visual studio code and install python.
Go to vscode official and install. Basically installed by default. I changed the setting to put the icon on the desktop.
When you start vscode immediately, it will be translated into Japanese because it is in English. Click the part surrounded by red in the lower left to open the search window of Marketplace. Search for Japanese, install the Japanese Language Pack for Visual Studio Code and restart to complete Japanese localization.
Japaneseized screen.
Next, install python. Officially fly and install python. Since there were some parts that did not support 3.8 yet, I will set it to 3.7.5.
Windows 64bit version download Windows x86-64 web-based installer, 32bit version download Windows x64 web-based installer.
Check PATH to set environment variables and install.
Check if it is installed when finished. Open a command prompt and execute a python command.
C:\Users\tokoroten>python
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
I was able to confirm that version 3.7.5 was installed.
Next, prepare to run python in vsCode. Just like when Japaneseizing, open Marketplace and enter python to install.
Now that python is ready with vsCode, I will try it immediately. Create a workspace folder directly under the C drive and create a python file that displays "hello world" appropriately. (This time I made hello.py in python_study / hello) From the terminal at the bottom of vsCode
python Hello.py
Enter and execute. Since Hello world was displayed safely, I was able to confirm that python was running.
The next article will be set on the slack side.
Recommended Posts