How To Install MatPlotLib in Visual Studio Code (Windows 11)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone in this video we're going to be talking about how to install matplotlib in visual studio code on windows 11. if you do not have visual studio code installed yet on your pc click on the video in the top right hand corner of your screen now or in the description down below to quickly install visual studio code on windows 11. so let's get right into this tutorial let's begin by opening up visual studio code by heading to our search bar and right clicking it and running it as an admin so no potential permission errors pop up later now let's go on our desktop and create a brand new folder this will be used for our matplotlib project so i'm just going to call it such inside visual studio code let's open up our plotlib project we need a python file to import matplotlib into right so let's create a new file through this button here and name it main.pi the pi indicating that we are creating a python file now let's go up to view and open our terminal window as you can see we are indeed inside our newly created folder on our desktop based on this directory here so in order to import libraries inside our folder we should create a python virtual environment to accomplish this let's head down to our terminal and type python 3.10 or whatever version of python you are currently working with dash m v e n v and i'm going to call mine study session in this line here you can replace study session with whatever you wish to call your virtual environment now if we go back to our file explorer on visual studio code you can see that our virtual environment is now here also make sure you're using the correct interpreter after creating your virtual environment like so so let's first activate our virtual environment so that our terminal knows we only want to work within this environment so we need to initiate this activate file here through a terminal that was created with our virtual environment so to get there from our map plotlib folder we enter study session scripts and then activate be sure you are using forward slashes when moving between folders now you can see we are working within our virtual environment because of the parentheses names here on the left of our terminal line to upgrade pip let's type pip 3 install dash dash upgrade pip we will install the latest version of pip if you receive the following error could not install packages due to an os error then all you need to do is come into our python virtual environment config folder and change include system site packaging to true back into our main python file we can start to install matplotlib to our virtual environment to do so let's type pip install mapplotlip and you should see a download begin like so to validate this let's write the following simple code that plots the following set of data then when we hit run we are presented with our graph meaning that map plot lib is now working thank you for checking out this video and i hope it helped your understanding of how to install matplotlib in visual studio code on windows 11. if you enjoyed please like subscribe and consider checking out our youtube memberships by clicking that join button down below however if you have any comments questions or concerns about the information i provided in this video please leave a comment down below and i will do my best to address your concerns
Info
Channel: StudySession
Views: 39,978
Rating: undefined out of 5
Keywords: How To Install MatPlotLib in Visual Studio Code, how to install matplotlib, install matplotlib, matplotlib vscode, python windows 11, visual studio python, vscode matplotlib, windows 11
Id: qPiXA6s1cFs
Channel Id: undefined
Length: 4min 23sec (263 seconds)
Published: Mon Jul 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.