You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/python/tutorial-working-with-python-in-visual-studio-step-05-installing-packages.md
+10-16Lines changed: 10 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
---
2
2
title: Python in Visual Studio tutorial step 5, install packages
3
3
titleSuffix: ""
4
-
description: Step 5 is a core walk-through to demonstrate Python capabilities in Visual Studio and Visual Studio's features to manage packages in a Python environment.
5
-
ms.date: 12/11/2021
6
-
ms.custom: devdivchpfy22
4
+
description: Step 5 of a core walkthrough of Python capabilities in Visual Studio. Demonstrates Visual Studio features on how to manage and install packages in a Python environment.
5
+
ms.date: 02/28/2022
7
6
ms.topic: tutorial
8
7
author: rjmolyneaux
9
8
ms.author: rmolyneaux
@@ -13,6 +12,7 @@ ms.technology: vs-python
13
12
ms.workload:
14
13
- python
15
14
- data-science
15
+
ms.custom: devdivchpfy22
16
16
---
17
17
18
18
# Step 5: Install packages in your Python environment
@@ -23,9 +23,7 @@ The Python developer community has produced thousands of useful packages that yo
23
23
24
24
## View environments
25
25
26
-
1. Select the **View** > **Other Windows** > **Python Environments** menu command. The **Python Environments** window opens as a peer to **Solution Explorer**.
27
-
28
-
The Python environments window shows the different environments that are available to you. The list shows both environments that you installed using the Visual Studio installer, and environments that you installed separately. These environments include global, virtual, and conda environments. The environment in bold is the default environment that's used for new projects. For more information about working with environments, see [How to create and manage Python environments in Visual Studio environments](managing-python-environments-in-visual-studio.md).
26
+
1. Select the **View** > **Other Windows** > **Python Environments** menu command. The **Python Environments** window opens as a peer to **Solution Explorer** and shows the different environments available to you. The list shows both environments that you installed using the Visual Studio installer and environments you installed separately. That includes global, virtual, and conda environments. The environment in bold is the default environment that's used for new projects. For more information about working with environments, see [How to create and manage Python environments in Visual Studio environments](managing-python-environments-in-visual-studio.md).
1. The **Overview** tab in the Python Environments window provides quick access to an **Interactive** window for that environment andthe installation folder of the environment and interpreters. The **Packages** tab isavailable below the Overview tab.
75
+
1. When you look at the editor window, notice that when you hover over the `numpy`and`matplotlib`import statements that they aren't resolved. The reason is the packages haven't been installed to the default global environment.
78
76
79
77
For example, select **Open interactive window**and an **Interactive window**for that specific environment appears in Visual Studio.
80
78
81
79
1. The **Packages** tab in the Python Environments window lists all packages that are currently installed in the environment.
82
80
83
81
## Install packages using the Python Environments window
84
82
85
-
See the steps below to install Python packages inthe **Python Environment**window.
83
+
1. From the Python Environments window, select the default environment for new Python projects and choose the **Packages**tab. You'll then see a list of packages that are currently installed in the environment.
86
84
87
85
:::moniker range=">=vs-2022"
88
86
[Install packages in an environment](media/environments/install-python-packages-2022.gif)
89
87
:::moniker-end
90
88
91
-
1. From the **Python Environments**window, select the default environment for new Python projects.
89
+
1. Install `matplotlib` by entering its name into the search field and then selecting the **Run command: pip install matplotlib**option. Running the command will install `matplotlib`, andany packages it depends on (in this case that includes `numpy`).
92
90
93
91
1. Choose the **Packages** tab.
94
92
95
-
:::moniker range="vs-2022"
96
-

97
-
:::moniker-end
93
+
1. Consent to elevation if prompted to do so.
98
94
99
-
:::moniker range="<=vs-2019"
100
-

101
-
:::moniker-end
95
+
1. After the package is installed, it appears in the **Python Environments** window. The **X** to the right of the package uninstalls it.
102
96
103
97
1. Enter `matplotlib` into the search field to install `matplotlib`.
104
98
@@ -131,7 +125,7 @@ See the steps below to install Python packages in the **Python Environment** win
131
125
132
126
## Run the program
133
127
134
-
After installing `matplotlib`[matplotlib](https://matplotlib.org/), run the program with (**F5**) or without the debugger (**Ctrl**+**F5**) to see the output:
128
+
Now that [matplotlib](https://matplotlib.org/)is installed, run the program with (**F5**) or without the debugger (**Ctrl**+**F5**) to see the output:
135
129
136
130

Copy file name to clipboardExpand all lines: docs/python/tutorial-working-with-python-in-visual-studio-step-06-working-with-git.md
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
title: Python in Visual Studio tutorial step 6, work with Git
3
3
titleSuffix: ""
4
4
description: Step 6 of a core walkthrough of Python in Visual Studio, covering Visual Studio's Git-related features.
5
-
ms.date: 08/16/2021
5
+
ms.date: 02/28/2022
6
+
ms.custom: devdivchpfy22
6
7
ms.topic: tutorial
7
8
author: rjmolyneaux
8
9
ms.author: rmolyneaux
@@ -22,13 +23,13 @@ ms.workload:
22
23
23
24
::: moniker range="vs-2017"
24
25
25
-
Visual Studio provides direct integration with local Git repositories and remote repositories on services like GitHub and Azure Repos. The integration includes cloning a repository, committing changes, and managing branches.
26
+
Visual Studio provides direct integration with local Git repositories and remote repositories. It helps you on services like GitHub and Azure Repos. The integration includes cloning a repository, committing changes, and managing branches.
26
27
27
28
This article provides a basic overview of creating a local Git repository for an existing project, and familiarizing yourself with some of Visual Studio's Git-related features.
28
29
29
30
1. With a project open in Visual Studio, such as the project from the [previous step](tutorial-working-with-python-in-visual-studio-step-05-installing-packages.md), right-click the solution and select **Add Solution to Source Control**. Visual Studio creates a local Git repository that contains your project code.
30
31
31
-
1. When Visual Studio detects that the project is managed in a Git repository Git-related controls appear along the bottom right corner of the Visual Studio window. The controls show pending commits, changes, the name of the repository, and the branch. Hover over the controls to see additional information.
32
+
1. When Visual Studio detects the project is managed in a Git repository, Git-related controls appear. The Git-related controls appear along the bottom right corner of the Visual Studio window. The controls show pending commits, changes, the name of the repository, and the branch. Hover over the controls to see additional information.
32
33
33
34

34
35
@@ -48,9 +49,9 @@ This article provides a basic overview of creating a local Git repository for an
48
49
49
50

50
51
51
-
1.Selecting the Git control with the repository name (**CosineWave** in a previous image), **Team Explorer** shows a **Connect** interface with which you can quickly switch to another repository entirely.
52
+
1.To switch to another repository, select the Git control with the repository name (**CosineWave** in a previous image), and then in **Team Explorer**, use the Connect interface.
52
53
53
-
1. When using a local repository, committed changes go directly into the repository. If you're connected to a remote repository, select the drop-down header in **Team Explorer**, choose**Sync** to switch to the **Synchronization** section, and work with the **Pull** and **Fetch** commands presented there.
54
+
1. When you use a local repository, committed changes go directly into the repository. If you're connected to a remote repository, select the drop-down header in **Team Explorer**, select**Sync** to switch to the **Synchronization** section, and work with the **Pull** and **Fetch** commands presented there.
0 commit comments