Step 5: Install packages in your Python environment
Applies to:
Visual Studio
Visual Studio for Mac
Visual Studio Code
The Python developer community has produced thousands of useful packages that you can incorporate into your own projects. Visual Studio provides a UI to manage packages in your Python environments.
View environments
- 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.


Note You can also use the Ctrl+K, Ctrl+` keyboard shortcut to open the Python Environments window from the Solution Explorer window. If the shortcut doesn’t work and you can’t find the Python Environments window in the menu, it’s possible that you haven’t installed the Python workload. See How to install Python support in Visual Studio on Windows for guidance about how to install Python.
With a Python project open, you can open the Python Environments window from Solution Explorer. Right-click Python Environments and select View All Python Environments.


from math import radians import numpy as np # installed with matplotlib import matplotlib.pyplot as plt def main(): x = np.arange(0, radians(1800), radians(12)) plt.plot(x, np.cos(x), 'b') plt.show() main()


Install packages using the Python Environments window
- 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.




Note A small progress bar might appear underneath the environment to indicate that Visual Studio is building its IntelliSense database for the newly-installed package. The IntelliSense tab also shows more detailed information. Be aware that until that database is complete, IntelliSense features like auto-completion and syntax checking won’t be active in the editor for that package.
Visual Studio 2017 version 15.6 and later uses a different and faster method for working with IntelliSense, and displays a message to that effect on the IntelliSense tab.
Run the program
Now that matplotlib is installed, run the program with (F5) or without the debugger (Ctrl+F5) to see the output:
не получается установить matplotlib в visual studio на mac
чекнула туториалы, нужно создать venv и установить matplotlib, так и сделала вот что выдаёт:
(studysession) (base) macbookpro@MacBook-Pro-MacBookPro matplotlib % pip3 install matplotlib Collecting matplotlib Using cached matplotlib-3.6.2-cp38-cp38-macosx_10_12_x86_64.whl (7.3 MB) Collecting packaging>=20.0 Using cached packaging-22.0-py3-none-any.whl (42 kB) Collecting python-dateutil>=2.7 Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting numpy>=1.19 Downloading numpy-1.23.5-cp38-cp38-macosx_10_9_x86_64.whl (18.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.1/18.1 MB 600.8 kB/s eta 0:00:00 Collecting contourpy>=1.0.1 Using cached contourpy-1.0.6-cp38-cp38-macosx_10_9_x86_64.whl (240 kB) Collecting kiwisolver>=1.0.1 Downloading kiwisolver-1.4.4-cp38-cp38-macosx_10_9_x86_64.whl (65 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 2.0 MB/s eta 0:00:00 Collecting pyparsing>=2.2.1 Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 1.5 MB/s eta 0:00:00 Collecting pillow>=6.2.0 Downloading Pillow-9.3.0-cp38-cp38-macosx_10_10_x86_64.whl (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 1.9 MB/s eta 0:00:00 Collecting fonttools>=4.22.0 Using cached fonttools-4.38.0-py3-none-any.whl (965 kB) Collecting cycler>=0.10 Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB) Collecting six>=1.5 Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Installing collected packages: six, pyparsing, pillow, packaging, numpy, kiwisolver, fonttools, cycler, python-dateutil, contourpy, matplotlib Successfully installed contourpy-1.0.6 cycler-0.11.0 fonttools-4.38.0 kiwisolver-1.4.4 matplotlib-3.6.2 numpy-1.23.5 packaging-22.0 pillow-9.3.0 pyparsing-3.0.9 python-dateutil-2.8.2 six-1.16.0
вроде установиось всё, но запускаю import matplotlib в том же проекте и выдаёт No module named ‘matplotlib’ подскажите пожалуйста что не так
Отслеживать
148 1 1 золотой знак 1 1 серебряный знак 12 12 бронзовых знаков
Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
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.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing matplotlib in VS code tutorial #2372
SarcasticBanana opened this issue Jan 30, 2019 · 5 comments
Installing matplotlib in VS code tutorial #2372
SarcasticBanana opened this issue Jan 30, 2019 · 5 comments
Comments
SarcasticBanana commented Jan 30, 2019
I was following a tutorial (https://code.visualstudio.com/docs/python/python-tutorial), and to complete it, I needed to install and run the process:
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 20, 100) # Create a list of evenly-spaced numbers over the range
plt.plot(x, np.sin(x)) # Plot the sine of each x point
plt.show() # Display the plot
The tutorial then told me to install the package matplotlib, by running the code: sudo python3 -m pip install matplotlib in the terminal. This does not work and all I am left with a blank screen in the terminal (the picture below) where I can type anything. I have looked at other problems filed with this, but can’t find anything relating to my issue.
The text was updated successfully, but these errors were encountered:
SarcasticBanana commented Feb 1, 2019
Hi @SarcasticWatermelon,
do you get the same result by just going to the console an use:
pip install matplotlib
Be sure you have the right version of pip installed (if you have different python versions (2 & 3) installed.Hope it helps,
Maurice
I think it is an error on my part. I am working on this on a school computer, so therefore it will not allow me to install things. I will try this on my home computer to see if this works and get back to you with any further issues in the future. Thanks for your help, though!
How to Install Pandas into Visual Studio Code
In this blog, we’ll demonstrate how to seamlessly integrate the powerful Pandas library into Visual Studio Code, a favored Python IDE among data scientists and software engineers. Elevate your data analysis capabilities and streamline your workflow with this essential tool in your toolkit.
By Saturn Cloud | Monday, June 19, 2023 | Miscellaneous

As a data scientist or software engineer, you know the importance of having the right tools in your toolbox. One of the most popular tools for data analysis in Python is the Pandas library. In this article, we’ll show you how to install Pandas into Visual Studio Code, a popular integrated development environment (IDE) for Python.
What is Pandas?
Before we dive into the installation process, let’s first define what Pandas is and why it’s so useful. Pandas is a Python library that provides data manipulation and analysis tools. It’s built on top of the NumPy library, which provides support for large, multi-dimensional arrays and matrices. Pandas makes it easy to work with data in a variety of formats, including CSV, Excel, SQL databases, and more.
Some of the key features of Pandas include:
- Dataframe and series objects for working with tabular data
- Support for data cleaning, filtering, and transformation
- Built-in support for handling missing or null values
- Integration with other Python libraries, such as Matplotlib and Scikit-learn
Now that you know what Pandas is and what it can do, let’s move on to the installation process.
How to Install Pandas in Visual Studio Code
Installing Pandas in Visual Studio Code is a straightforward process that can be completed in just a few steps. Here’s what you need to do:
Step 1: Install Python
Before you can install Pandas, you need to have Python installed on your computer. If you haven’t already done so, you can download the latest version of Python from the official Python website (https://www.python.org/downloads/). Be sure to download the version that matches your operating system (Windows, macOS, or Linux).
Step 2: Open Visual Studio Code
Once you have Python installed, you can open Visual Studio Code. If you don’t already have it installed, you can download it from the official Visual Studio Code website (https://code.visualstudio.com/download).
Step 3: Open the Terminal
In Visual Studio Code, click on the Terminal tab at the top of the screen. This will open a new terminal window at the bottom of the screen.
Step 4: Install Pandas
In the terminal window, type the following command to install Pandas:
pip install pandas
This will download and install the latest version of Pandas from the Python Package Index (PyPI). Depending on your internet connection speed, this process may take a few minutes. You can also choose the specific version of Pandas that you want to install by typing the following command:
pip install pandas==2.1.1 # this command will install Pandas version 2.1.1 to your computer.
Step 5: Verify the Installation
Once the installation is complete, you can verify that Pandas has been installed correctly by typing the following command in the terminal window:
python -c "import pandas; print(pandas.__version__)"
This will print the version number of Pandas that you just installed, either the latest version or the specific one that you defined. If you see a version number, then Pandas has been installed correctly.
Conclusion
In this article, we’ve shown you how to install Pandas into Visual Studio Code, a popular IDE for Python. Pandas is a powerful library for data manipulation and analysis, and it’s a must-have tool for any data scientist or software engineer working with Python. By following the steps outlined in this article, you can quickly and easily install Pandas and start working with data in Visual Studio Code.
About Saturn Cloud
Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.