How to Install Numpy in Python 3.12 (2024)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this video guys let's see how we can install numpy in Python 3.12 and how we can write some sample code using numpy First Press Your Windows key and open command prompt or you can open Terminal in Linux or Mac and let's check our python version so as you can see I'm on python 3.1 2.1 that is the latest version as of now that is 15th March of 2024 now to install lpai just type pip install numai hit enter and if you get an error that says pip is not found or pip is not installed check the look in the description it will show you how you can install pip so in my case I've already installed numpy so nothing happen in your case it will take a few seconds and numpy will be installed once this is installed you can use numpy in our python file and let's see how we can imported and how we can write some sample code so I'll close my terminal here and let's create a new folder and let's call it my numai project and let's go inside this folder and now here let's create a new file where we will write some sample python code and I'll just call it main.py double click on this or open it in any editor of your choice and here let's write some sample code that uses numpy so I have the sample code here and I'm importing numpy like this so we just type import numpy as NP or we can just import numpy and instead of NP here we will have to write the whole thing like this that's why I'm using import numpy as NP so that I can use the short form everywhere else so what we are doing is we are just taking a few arrays here and then we are reshaping the array we are slicing the array we are adding the two arrays and we are multiplying the two arrays and so on and we are just printing basic statistics so let's see how we can run this go back to your project folder and open your terminal or command prompt in this folder in Windows what you can do is just type or just press on this Windows bar this address bar here and type CMD and your command prompt will be opened in this directory as you can see I'm inside my project folder now just type Python and main.py or whatever you have named your file and hit enter and numi will be used and as you can see the array are added multiplied and all the other basic statistical stuff is done so this is how you can install lumpy in Python 3.12 if you have any questions let me know in the comments below
Info
Channel: The Code City
Views: 352
Rating: undefined out of 5
Keywords: install numpy in python, pip install numpy, python install numpy, how to install numpy in python 3.12, install numpy in python 3.12
Id: 3qJhtD884S8
Channel Id: undefined
Length: 2min 28sec (148 seconds)
Published: Tue Mar 19 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.