Before testing Python applications in a local development environment, you must prepare the development environment. This topic describes how to configure a Python development environment. It also provides download links for related tools.

Install Python

Download an installation package from the Python official website based on your operating system.
Note We recommend that you download Python 3.7.4 or Python 2.7.16 because either one is more compatible with the technology stack version of Web App Service.
Linux
  1. Go to the directory where a Python installation package such as Python-3.7.4.tgz resides and use the following command to extract the package.
    tar xvf Python-3.7.4.tgz
  2. Go to the directory where the Python installation package resides and use the following commands to compile and install Python.
    ./configure --with-ensurepip=install
    make && make install

macOS

Use the following brew command to install Python.
brew update && brew install python

Windows

Go to the directory where a Python installation package resides, double-click the installation package, and follow the provided instructions to install Python.

Virtual environments

If you develop multiple projects in parallel, we recommend that you isolate these projects by using Python virtual environments. This method helps you eliminate version conflicts between dependency packages of different projects.

For more information about how to use virtual environments, see Virtual environments and packages.

Use an IDE

An integrated development environment (IDE) is a software application that provides developers with comprehensive tools for software development. It also helps developers significantly improve development efficiency. The following lists commonly used IDEs for developing Python applications: