Set Up Python Environment
In order to write Python code, it is necessary to have Python installed on your computer. Furthermore, you might also need to install a Python development IDE like Visual Studio Code or PyCharm, alongside Python. The use of an IDE makes the development of a Python program easier. An IDE typically includes a source code editor, build automation tools, a debugger, and more.
Follow the steps below to complete the setup of the Python environment:
- Install Python:
- Install Python IDE (Integrated Development Environment):
- Download Visual Studio Code according to your operating system.
- After the download is complete, proceed with the installation.
- After the installation is complete, launch the Visual Studio Code IDE.
- Navigate to View > Extensions and proceed to install the following extensions:
- Python by Microsoft
- Prettier - Code formatter
Choose a link from the options below that matches your operating system:
Install Python on Windows 10/11
Install Python on Ubuntu 20.04/Ubuntu18.04/Linux
Follow the steps below to install and set up the Visual Studio Code IDE:
Note: To format code in Visual Studio Code, press Ctrl + Shift + I and save.