PIP and Basic intoduction to python packages
Hello, In this video tutorial lets see what is pip so pip is python package managing system through which you can install python packages, packages are peices of scripts or codes which assist programmers in a way that they dont have to write tone of code to do simple tasks also because of packages, you dont have to learn each and everything because some body already has write down a code for you so you can just import that package in your code and use it, Isn't cool?
Now lets see that how you can install python package, open command prompt (CMD) and type
pip install <package_name>
and it will install in your code.
lets say you want to install package numpy, so type
pip install numpy
and then in your code, write
now you can use numpy in your code,
Some packages are not just few lines of small scripts instead those are complete frameworks and requires other softwares to run e.g tensorflow require CUDA and CUDnn, and installation of those packages are not easy just through pip, so the best way is to google it or just follow along with my tutorials and I will try to cover most of the things so that you dont have to search.
OS & SYS Module
Now lets see some basic python packages, In this tutorial I am just giving introduction but in next video I will try to cover most of the functions in os and sys modules.
First lets create a folder in same directory in which you put your code (.py) file.
Lets run a script
This snippet will create folder in same directory where you put your code. In the same way if you want to see that if the folder is already present in that directory so you can write
The sys module in python provides variousvariables and functions that are used to manipulate different parts of the python runtime environment. Lets do a simple example that how you can pass command line arguments to your script using sys module.
For that write following piece of script
Now open cmd in same directoy and type : python name_of_python_file.py Alex Datascientist
and script will print : My name is Alex and I am Datascientist.
Subscribe to my youtube channel
- Website Introduction, future plans and How to install python in your windows machine
- Variables in python
- Lists Tuples and Dictionaries in python (Datastructures)
- Python 3 Introduction to loops,try except block and functions
- Python 3 loops and functions in details
PIP and introduction to python essential packages
- Introduction to file handling in python
You may also like to read about
May 11, 2023, 3:30 p.m.
Jan. 29, 2023, 7:10 p.m.
Feb. 8, 2022, 5:34 p.m.
Oct. 19, 2021, 1:47 p.m.