Installing Matplotlib in Visual Studio Code

preview_player
Показать описание
In this video tutorial, we will learn to use "matplotlib" and "numpy" packages to create a graphical plot as is commonly done with data science.

******************************************
import numpy as np

*******************************************

Now run the file in the debugger using the "Python: Current file"
you would see a message, "ModuleNotFoundError: No module named 'matplotlib'". Such a message indicates that the required package isn't available in your system.

Step 2: 'matplotlib' package installation (which also installs numpy as a dependency):

open Command Palette to run Terminal: Create New Integrated Terminal (Ctrl+Shift+`).

Note: We will create a virtual environment and install the required packages, Such isolation reduces many complications that can arise from conflicting package versions.

**Enter the following command:
py -3 -m venv .venv
.venv\scripts\activate

Important:
***********

Set -ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

Step 3: Select your new environment by using the Python: Select Interpreter command from the Command Palette.

Run the following command:
python -m pip install matplotlib

Step 4: Deactivate environment:
Once you are finished,
type "deactivate" in the terminal window to deactivate the virtual environment.

If you found this video tutorial useful and would like to support me, you can do so by buying me a coffee using the below link!

****Other Best VS Code Tutorial by Cool IT Help*****

- Seaborn setup in Visual Studio Code
- How to create a Maven Based Web Project in Visual Studio code? | Maven Setup VS Code
- Apache Tomcat 9.0 Setup and Web Project Deployment in Visual Studio code
- Using SonarLint in Visual Studio Code
- Installing Matplotlib in Visual Studio Code
- Configure and Run Debugger on Python program in Visual Studio Code | Beginner's Tutorial
- Setting up Python Development Environment in Visual Studio Code | Tutorial for Beginners
- How to connect SQLite database with Visual Studio Code?
- Running a java program in Visual Studio Code on Mac OS X Catalina | Java Setup VS Code
- Running C/C++ program in Visual Studio Code on Mac OS X Catalina
- How to run C and C++ programs in Visual Studio Code (Windows 10)?
- Regex Previewer | Useful Extension for Visual Studio Code for live testing your regular expressions.
- How to completely uninstall Visual Studio Code from windows?
- How to setup JavaFX Environment in Visual Studio Code?

- How to run a java program in visual studio code? | Java setup in VS code


#MatplotlibVScode #CoolITHelp
Рекомендации по теме
Комментарии
Автор

I'm a computer science student and I can say this is highly effective. It took me approx. 30 min for me to figure out how to solve "You cannot run this script on the current system" error though. Thanks a million.

thatskyplayer
Автор

Have been pulling out my hair for the past 30 minutes trying to figure this out. Thank you so much, have a glorious day my friend!

adamclarke
Автор

I am a computer science student and I decided to use matplotlib for my homework. first time in the history of my education. I made the configuration of my setup less than 10 minutes. thank you.

efecantepe
Автор

Thank you so much for this tutorial! I postponed installing matplotlib for such a long time, cause I didn't find a proper tutorial, but with this it was really easy! :D

Aeorith
Автор

After doing all steps it still shows module not found what to do ??

advancegamer
Автор

"This is looking nice" - enough said!

ChequeWriter
Автор

Why I need to creat a virtual environment? What is the different between with no virtual environment?

承鈞-qh
Автор

hi there isn't any item in my "Scripts" folder called 'activate'

rabbitazteca
Автор

"WARNING: Failed to activate VS environment: Could not parse vswhere.exe output" - how to bypass this ?

lokenathmukherjeekol
Автор

hello I have this error once i try to run my code.
DLL load failed while importing _path: The specified module could not be found.
PS C:\Users\user\Documents>

oscar.kiamba
Автор

i didnt understand what i did, but it works, thank you

anton.mikheyev
Автор

I really appreciate your help, man

I really appreciate your help, man

I really appreciate your help, man

udyanabha
Автор

What if I don't create a virtual environment for this ?

VikasRaj_Hyd
Автор

I have an error: import matplotlib.pyplot as plt
IndentationError: unexpected indent

What should i do

lukassemrau
Автор

how do i change the powershell script policy???

faiqhilman
Автор

thank you sir you really are a tremendous help !

baptistearnaudo
Автор

venev is not activated in the system what to do

rojadsorum