Develop Python 2 applications. Installs dependencies from your requirements.txt file and the Python extension.
| Metadata | Value |
|---|---|
| Contributors | The VS Code Python extension team |
| Definition type | Dockerfile |
| Languages, platforms | Python |
Note that only the integrated terminal is supported by the Remote - Containers extension. You may need to modify launch.json configurations to include the following value if an external console is used.
"console": "integratedTerminal"Beyond that, just follow these steps:
-
If this is your first time using a development container, please follow the getting started steps to set up your machine.
-
To use VS Code's copy of this definition:
- Start VS Code and open your project folder.
- Press F1 select and Remote-Containers: Add Development Container Configuration Files... from the command palette.
- Select the Python 2 definition.
-
To use latest-and-greatest copy of this definition from the repository:
- Clone this repository.
- Copy the contents of
containers/python-2/.devcontainerto the root of your project folder. - Start VS Code and open your project folder.
-
After following step 2 or 3, the contents of the
.devcontainerfolder in your project can be adapted to meet your needs. -
Finally, press F1 and run Remote-Containers: Reopen Folder in Container to start using the definition.
This definition includes some test code that will help you verify it is working as expected on your system. Follow these steps:
- If this is your first time using a development container, please follow the getting started steps to set up your machine.
- Clone this repository.
- Start VS Code, press F1, and select Remote-Containers: Open Folder in Container...
- Select the
containers/python-2folder. - After the folder has opened in the container, press F5 to start the project.
- You should see "Hello, remote world!" in a terminal window after the program executes.
- From here, you can add breakpoints or edit the contents of the
test-projectfolder to do further testing.
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE