I wanted to create a program to retrieve data from a SwitchBot temperature and humidity sensor, so I set up a Python environment on my Windows PC. This is my personal setup log.
Installing Python
Downloading Python
- Go to the official Python website.
- From the top menu, select “Downloads” and download the latest version for Windows.
Installing Python
- Run the downloaded installer (
python-3.x.x.exe
). - On the first screen, make sure to check “Add Python to PATH”.
- Click “Install Now” to start the installation.
- When installation is complete, you’ll see the message “Setup was successful”.
Verifying the Installation
- Open Windows PowerShell.
- Enter the following command to verify that Python was installed correctly:

Installing Visual Studio Code (VSCode)
Downloading VSCode
- Go to the official Visual Studio Code website.
- Click “Download for Windows” to download the installer.
Installing VSCode
- Run the downloaded installer (
VSCodeSetup-x.x.x.exe
). - Follow the instructions on the installation screens.
- It’s recommended to check the following options during installation:
- Add to PATH
- Register Code as an editor for supported file types
Verifying the Installation
- Launch VSCode.
- Make sure it starts up without any issues.
Setting Up Python Extensions
Installing Extensions
- Open VSCode and click the Extensions icon (square icon) on the left sidebar.
- Search for “Python” and install the extension provided by Microsoft.
Configuring Extensions
- Create or open a Python file (
.py
). - If you see “Linter not installed” in the bottom-right corner of VSCode, click “Install” and install the recommended linter (e.g.,
pylint
).
Setting the Interpreter
- Open the Command Palette (
Ctrl + Shift + P
). - Type “Python: Select Interpreter” and choose the interpreter you want to use from the list.
Running Python
Creating a Project Folder
- Create a new folder anywhere you like.
- Open that folder in VSCode.
Creating a Python Script
- Inside the folder, create a new Python file (e.g.,
hello.py
). - Enter the following simple Python code:

Running the Python Script
- Save the file.
- Right-click inside the editor and select “Run Python File in Terminal”.
- Check that
Hello, World!
is displayed in the terminal.