Pycharm | PyCharm Tutorial For Beginners | Python Training | Great Learning

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
python is widely used by programmers to create software applications with a simple clean and understandable code base they can even use a variety of python integrated development environments to speed up the development of unique software applications pycharm is a cross platform created by jetbrains pycharm is compatible with windows linux and mac os in addition to that it supports python versions 2x and 3x at the same time pycharm's capabilities and features assist programmers in writing a variety of python software applications swiftly and efficiently so why wait let's have a quick introduction and walkthrough on pycharm ide in this video [Music] if you haven't subscribed for our channel yet i would request you to hit the subscribe button and turn on notification bell so that you don't miss any new updates or video releases from great learning if you enjoy this video show us some love and do like this video knowledge increases by sharing so make sure you share this video with your friends and colleague make sure you comment on this video any queries or suggestions i'll be more than happy to respond to all of them hello everybody welcome to this video of pycharm where we'll be learning how to efficiently work with python programs in the ide called python so agenda of this particular video goes this way so first we'll know why do we need ide and what is the ide and next we'll be talking about different kinds of id which is available in python next we'll see how to install pycharm and then we'll be having a walkthrough of the environment like where you have to work with the programs how do you have to install how to debug how to execute and other stuff so apart from that we also have different options present in ide of pycharm so here we'll be dealing with key maps and shortcuts omni and macros and micros and many other elements after that we also be learning how to integrate and version control the ide plus the html and css part right so why wait let's start this video now now if we look into what is an id as we were talking about lot of pycharm and also integrated development environment now i will give you a brief what is this id stands for an id is a software application or platform that provides an integrated environment to the programmers to develop build debug package and deploy codes in multiple languages now you will ask me what is actually uh developing a code building code debugger code and package and deploy codes right so yeah if you are a software developer or if you are someone who actually into this software university you you should know what is developing a code basically when we write a code we actually develop a code to you know uh make our works done right so when we develop this code we get some of the few problems suppose you make some mistakes or you get some errors so in this case if there is someone who is going to help you to say hey whatever you are writing this is not right maybe you have a stunning mr or maybe you have a indentation mistakes right so this is where id help us to do these forces and make our life easy now we will have a look at why do we need an id in a proper term so suppose you are writing a code testing a code and debugging a code so first you write a code right to make your work done after you write a code your work is not done you have to test it you have to check your code is working properly or not now if when you are going to test your code if you get any error or if you get any uh not you know some output that is not required that time you have to debug your code to make your code work properly so in this case you can do all these three things in one at a place don't you think it is really important to do that suppose you need to write a code somewhere you need to test your code somewhere and you need to debug your code somewhere how it's painful for your code to do right so this is where we need id now comes to makes coding experience comfortable yes obviously when you actually have a assistance who is going to say suppose you are writing a code and you have some spelling mistakes it's going to give you an error you can say okay there is someone who is going to help me to say hey don't make these mistakes right so this is how it's making coding experience comfortable now if we talk about the text editor right in past what we used to do we used to write our code in the text editor like notebook notebook plus plus and then what we need to do we need to go to our command line and then we need to execute that then if you have any error from there it you need to just find it out the line number and to find it out what error you have right it's really pathetic and hectic to do that when you have thousand lines of code right so this is something is solved by the id so this id is basically you will have the line number as well as you don't need to go to notebook and edit or both right so this is how our id is making our life easy and everything can be done in id that we already discussed about so now if you want to if we actually want to look into the very specific part of ide then first thing is we can actually do the code analysis right then graphical debugger then unit tester you can do and version control is also can be done using ide then if we talk about the program uh project management right so yeah you can do the project management using ide then comes the collaboration if you want to do collaborate with few other codes you can do easily in id then comes increase efficiency and resource management so these are the key points you can say why do we need ide now we will have a look at the different types of id we have in our particularly for python right so the first thing is we have pycharm so python is one of the most popular ide which is actually used by lots of companies and user to make their work done then we have anaconda this is basically for data science if you are a data scientist enthusiast then you should go for anaconda and lastly we have google collab this is last but not the least there are lots of id also we have this is the few example we have given over here then this google collab is basically from google which is basically for the ai researcher if you are a ai researcher and you don't have a good computer or system to work with then google collab is for you google gives lots of features to make your work done right so these different ideas we have so let's have a look at what is pycharm pyjama is one of the most famous integrated development environment in short which is known as id for python developed by a seasoned organization called jetbrains so basically jetbrains invented by charm it's one of the most popular environment to do the python coding now if you just write python download and from there you will get the first link over here right you just need to click on this link if you click on this link it will redirect to you for their official website to download pyjama you can see you have to download python there is two particular version you have one is proficient one is community so basically if you want to go for professional you have to pay after few time if you want to go for using this for your company then we should actually go for professionals then we have another version that is for community community is basically for us it's free and open source you can see it's also mentioned over here now there are few operating system we have we have mac we have linus so if you have mac you just need to click on this tab then there is some different exe file you need to download so as i have windows i am going to download it so you just to click on download it will automatically start downloading right thank you for downloading but i just need to pause it because i have already download pycharm actually a download python dot exe file you have to click on that it will automatically start installing it there is no other ad like up like you will not need to do lots of things to do that it's automatically will start taking the download so as you can see we have done this installing process so let me show you so you can see there is automatically a actual uh like icon is there i just need to click on this icon then it will automatically start basically opening this particular software so let me just do that it will take few time to get started so i will show you what are the things we have in this particular ide right how can you make your new project how can you make your first python file and how can you run them so you can see it started to get you know it's the spy jump is basically taking few times to get start with right so this is the interface we are going to get for pyjama how can you start with making your new project right so in this case you can see this is the whole uh interface we have for pycharm now if i want to click on file and now okay if i click on new project right it will ask me for the like the new project it will basically going to make a new environment for me so now there are few things we need to talk about now you have to give the project name suppose i am going to give a project name uh python jmu 2 or 1 right so i have given the project name now you can see this is the python inver interpreter this is new virtual uh environment environment now they have two option one is new environment using this you have to make your new environment otherwise the previously conv configured interpreter now you will ask me what is the difference between new environment and the previously configured interpreter now there are few difference we are going to talk about in this case you can see if you make a new environment for your project this is basically going to give you a new specific environment for your this specific demo right for this specific project so whatever the package you are going to install whatever the thing you are going to do that is very specifically for this particular project now if we do the previously configured interpreter it will basically if you have done any project earlier it will take that interpreter so if you're gonna change anything on that interpreter it will affect this particular project as well so suppose if you want to make a project where you just need to make few packages and you need to make a total new environment for it so then i should suggest you to go for making a new environment right so now if you look over here that the base interpreter so your base interpreter will be python 3.8 right in this case if you just go and previously configure interpreter then you will get you will get few option let me just show you the interpreter no i am not getting any option but there are if you have anaconda in your system you will get that if you have python in your system you will get that whatever the thing you want to select you can select for previously configured interpreter as i don't make any configuration previously that's why i need to make a new environment right after that i just need to click on create then it will give me a prop up basically to um like asking me if you want this making a project in this particular window or a new window right so for my case i want to make it in a new window right so basically it's going to make a new creating virtual environment for my new project python demo one so it will take few minutes uh to get loaded so let's see how we can start our first project using python and how can we actually execute them you can see we have got our environment the total new environment for this particular project now we have in default main dot py file right so now if you want to make a new python file you have to go to your project there click over here you will get an option for um okay right so you will get an option for what new you want to make i want to make a new python file i need to click over here after i click over here i need to give a name for this now i want to give a name for demo uh file one right so this will be my new file so now as we can see we got it right so now i'm going to write print then i'm going to write hey welcome to great learning right so now what i need to do i need to execute it how to execute it for that if you want to save something you have an option called save as right you can save as well and you also can have option of save all right control is in the basically the shortcut for that now if i just need to execute it what i need to do i just need to execute what for executing this you have this particular as well this uh run main this is basically for running the main file you have right so this is something you will give this particular uh symbol to run something now if you go here and if you just click over here you will get an option for run demo 5 1 as well so if i just run this run demo file one what i get i get thing welcome to great learning right so this is how you can start working with pycharm now in this part let's learn regarding understanding the basics of ide so first we have to start with creating and how to open the particular file or project in ide after that we'll know how to version control like what is the present version which we are using for this particular ide and what is the uh feature of those after that we'll be learning how to configure the id configuring is nothing but where the files has to be uh placed and where it has to go and how the id should execute so that's about understanding the basics of ide and quickly we shall see how does a pycharm id looks like this is how python pycharm id looks like so here you can see you have various options and first of all it is having welcome screen here you can directly launch a project here or open any existing python file then you also have how to create a version control is also here you can get the version control this is what i was speaking about so you can know how to create and open the file also get version of this particular id so if i quickly click on get version so this is how it looks like either you can integrate that with git github i mean to say apart from that it is mercurial and subversion so you have three different options in order to version control and you can also launch your github url here so that it is both it is in coordination local drive as well as the github account so that's about the understanding basics of pycharm ide now we shall see key maps and shortcuts first we should learn what is keymap in pycharm so python supports many key marks that means what are the different frequently used editors shortcuts will be displayed or the commands will be displayed in key maps so what is the shortcut you have in order to access that it's you have to go to help and then go to keymap reference so let's quickly see how does keymap reference look like in pycharm this is how pycharm ide looks like now we have to see how to have the key reference so we have to go to help and we have to have the key map reference here if you click on schema preference we'll be finding a sheet right opening in our browsers which is showing you all the shortcuts right whatever the user is using or the creator is using it's been listed here so if it is quick enough to access the shortcuts rather than going up to the menu and finding the sub menus and stuff you can directly note down the shortcuts which you are using frequently and try using this key map references now we shall learn regarding omni so it is a feature in pycharm where we use in order to navigate between location to location classes to classes or project directories to project directories it acts as a quick access to the projects or the classes which have declared in the code right so let's quickly see what are the different elements you have in omni so omni has functionality one main thing you have to know the features of omni is described in navigation menu in navigation menu you can find the options which is available which is categorized to be omni functionality okay so the first thing which you can see there is class right so class helps you to easily move between the classes which you use in the code say for example it is a big project and you have numerous of classes right so all these classes will be into in one particular code you can quickly access by using omni and the class option in that so the next one you have is back and then forward it is very simple if you want to access back option then it is ctrl alt left if it is a forward option that is control alt right that means it will return into a previous state where the code was if it is back if it is forward then it will try to go to the next state right so that's about the omni functionality let's quickly check on the id how this functionality work now you can see navigation button here that is navigate right if you click on that you will get first option as back if you want to go to the back that you can also use control alt left if not you can also have forward option which is disabled because we don't have anything on the platform here that is why then i spoke about class if you want to access class here you can also use this option so this is how omni will work in return it is like we are having a shortcuts to many of the menus mainly will be using back forward and class now we shall see macros and micros in pycharm so before knowing macros we should learn what is difference between the omni and the macros first of all so omni is a feature where we can go to the specific location specific folder specific class where we'll be getting our results but in micros we'll also reach that particular class where we want to reach but we will go through all the functions in between it is not directly we are going to that particular location we want to go either it might be a class or it might be a code right so let's quickly check upon what are the different macros we have right so generally we have navigate macro that is the main menu which i can tell you right in navigate we can go for declaration where you can also see different types of declaration which you have made in your code also what is the type of the declaration as well and super methods which you are using any methods and functions which you are using is displayed there apart from that you have one more element you have to look into that is search everywhere so you can search discover any class any associated method by using this option right so you can also search via google so let's quickly see in pycharm ide how does this macros and micros work now you have to locate the navigate menu so if you go there first you have to look into the declarations or uses right you have declaration on users and then you have implementations you have which type of declaration you have super method so all the access has been declared with shortcuts right if you want you can remember the shortcuts as well so apart from that you had an option called search everywhere that means anything you are missing you can't remember it is not listed if you know the name you can quickly type for example it might be a view right so you have different viewing options viewing methods view breakpoints so all the elements are present in this particular menu and you can search just like you search in google right that is how the macros will work in this particular pycharm ide next we shall learn regarding micros so micros are used in order to locate specific location within a file inside a file if you want to find any of the class or the code specific functions or methods you can use micros the majority of the development process will be using this particular tool itself because it is very quick to access it it will be having the hierarchy of menus a main menu sub menu again you'll be having a sub sub menu so that is how micros will work so next you have an option called from the source or select open file in this micros right here it will allow you to scroll between the chosen source that means whichever the code file which is open right that particular code file will be located by using select open file with whichever we open that will be located the next you have expand all as you all know expansion is nothing but if you click on that menu all the sub menus will be shown to you if not if you want to close it you can call it as collapse all it will collapse all the sub menus or directories which has been shown on the pycharm ide apart from that you also have show option menu that means it will show the different menu structure in the panel right in the project panel if you have a main function it is having a main folder in that apart from that you have many other files it will also be listed there let's quickly see how does these four will work in pycharm ide this is an ide these are the four options which i was talking about right so the first one which you can see is select open file if you click on that this is the file which is open right now where the program is adding two numbers it has been named as main dot py so which is opened is shown here the menu is called select open file then you have expand hall if you want to expand these these are the only elements we have to expand in this particular project so it is in expansion more if you want to collapse all you can click on that it will collapse the folder again i'll show the difference between expand and collapse i'm clicking on expand so only one particular file is there that is main dot py that has been shown again i collapse this yes it has collapsed next we have one more option called show options menu if you click on that you will get lots of sub menus which you can use if you want to move that to somewhere if you want to view that and if you want to resize if you want to stretch to left right maximize the tool window remove from sidebar if you want to remove this menu itself you can do all the additions and deletions you want as per the user requirement as per the developer requirement so this is about micros in pycharm now we shall see how to improve and write code in pycharm so improvement is nothing but how do we indent our code whatever code we try to write python code might be we write on pycharm that should be indented properly it has to give the breaks between the classes you declare between the methods you use between the functions you use and different declarations you make if you don't have break and if you just use a for loop or if loop without braces or the indentations is not proper it is very difficult for other programmer to continue whatever the code you have written and understand that particular code right so this is how you have to start having the improvement and you have to write a proper code with a good practice right so we shall see in pycharm it actually includes the standards right we you have to have a python program written in a place where it is indented and if as soon as the person sees the particular code he has to understand or she has to understand how this particular code works and what is the requirement it is serving right so the first thing you have to know is improve code completion so code completion is an option which is there in pycharm just like other ids for example visual studio for example there they'll be having auto intelligence process so what happens in auto intelligence if you are writing certain code in the platform it will try to give you all the options which is available for the code which you are writing say for example if you start with if it will show you the if statement if else statement if else if statement every possible actions will be shown to you it is your choice in order to choose which one it is adaptable right so it will give you the hints how you have to write the code so that is improve code completion if you want to access this you can manually press control plus space bar right from the keyboard then you have intention action that means it is showing you what are the different options you have it will intend the specific action if you are trying to do some debugging how do you debug and what are the break points you have and where is your cursor located with where it is going in the program so all the tracing will be used in this particular actions right so everything will be displayed to you so now let's quickly see how does this code improvement can be done in pycharm in this ide let's see how can we improve the process right if you try to give control plus space bar so it will show you what are the different option it can give if you want to start if if statement you can start if you want to start a class you can do it if you want to go for four you can do it then importing anything you can import it will suggest you all possible elements which you can use in your code so this is auto intelligence or improvement of the code this is how pycharm will suggest you to choose between the options now we shall see intention action how does it provide right now you have to press alt enter if you try to press alt enter it will say inject language or reference for example if it is a big code it will show you what are the different elements you can add with right you can just click on this it will show inject language or reference if you want to proceed this code somewhere you can click and it will also have certain options like edit intention settings or disable injection language or reference so all these options are used if it is a longer code you'll that it will know uh which where it has to break and how the program is executing so this is how the actions are shown in injection right so that's about improving and writing code in pycharm now we'll learn how does the python console looks in pycharm right so the option where you have to reach is first you have to go to tools and try to run the python console and it has a full featured python terminal uploaded in pycharm let's quickly check how does it look on pycharm ide this is the id of pycharm so we have to go to tools and we have to click on python or debug console right so i'm clicking on it here it is also you can directly access from the below menu but still this is the way to go tools and again you have to choose python or debug console right so now i'll try to put up a new file inside a project which i've created so we have to click on new and select python file so name the python file anything you wish for so now it is sample once that is done here i am going to show the square root of a number same program which is finding a square root for any number entered by the user so these are the lines of code you have to enter first thing is enter a number where you'll be asking the end user to enter a number then you will calculate that with a square root variable where you have a operation mentioned right a formula mentioned then you will display the output accordingly so let's quickly run this program so before running we have to debug right so go to run and then do the debug so also you can use alt shift f9 if not you can choose this way so i'm debugging this uh the file name which we gave a sample so we'll select the sample now we'll start debugging right there is no errors hence it has been executed quickly let's give a number here so i'm typing 25 the answer should be 5 25 the square root of 25 is 5. so if you could see uh the square root of 25 is phi is been printed right this is how a python console works in pycharm now we shall see how our interpreters connected in pie chart right majorly interpreters are used in order to verify whatever the code you write is it correct or wrong according to the rules or library functions right so there's one more way to check installation of interpreters in pycharm you can use python package index that is a pep install right you can use that and install it if you are running in python console if not you can directly assign the interpreter i'll show you how now this is the pycharm id it is better to start with a new project in order to know the interpreter settings right so let's quickly go to the file menu and start a new project right see here you can see the location you can also see the location of the environment and then also you can see the base interpreter you will be having uh two or more options if you are having more than one interpreters here you can select that and you can create the project right so if you want to continue in this wind only you can select this window if you want it in a new window it will create a new window if you choose new window option so i am taking this window itself so it will create virtual environment accordingly and the interpreter is set this is how the new project pycharm ide will look like now we shall see how do you debug and put up break points in python code in pycharm right so as of every programming language whatever the code you type you have two steps in order to get the output one you have to debug first then you have to run the code that is when you will get the desired output right let's quickly check in pycharm id how do we put up a breakpoint and also how do we debug already i have opened a python file here right a demo python file here i'll be pasting a code where we are swapping the two numbers from one variable to another variable right so i was talking regarding debugging to debug we have to go to the run menu and we have to press on debug if there is no errors directly it will execute i'm selecting the file right the value has been interchanged right so a was 5 before and b was 10 in the output you have got value of a as 10 and b of 5 okay so what about break points so let me quickly show you it's in the same menu that is run you have to go to break points and you have to enable so wherever you want you can just put up a break point what is the use of breakpoint the reason is whenever the code is very long right lengthy codes you have to put up breakpoints to break that into modules or sub codes right that is why you use breakpoints you can paste your breakpoint anywhere you want on the line if you want to take it out again you can press on the same breakpoint it will be out of your code right if you miss any of the breakpoints again you can go to run and you can go to uh restore breakpoint in toggle breakpoint option if you restore it will give you the first inserted breakpoint right so this is how debugging and breakpoint work in pie chart now we shall see how to integrate the version control for pycharm that means if you want to do any integration of different softwares or different platform different framework to python you can do that so you have an option to have the version control of them either you can connect git for example the repositories whatever the coding which you do simultaneously gets saved in git repository as well you can have that connect between the local system which is installed in your uh local drive or local computer the pycharm and the cloud-based git repository right you can have this connection by using integration of version control so python is compatible with numerous of control systems or the frameworks or other elements which you want to use plug-ins for the matter right let's quickly uh check upon how does this version control work in pycharm id so here you have an option in the menu called vcs if you click on that the first option you get the sub menu you get is enable version control integration and also many other menus are here if you want to create a git you can create a get if you want to create a mercurial repository you can do that also if you want to import any versions you can do that and you have different you can also share your project in github by using the space right so first option if you check first you have to enable before creating anything so you have an option to enable so you choose which uh repository you want to use either it might be get or subversion or mercurial so you have three options to do it if you click on git and you will be asked your git url if you quickly give your url it will be integrated so that is how you can integrate the git repository in pycharm the next topic is html and css integration in python you also have option to integrate the html uh files or the code files which you are trying to write right so let's quickly see in our python editor how well it supports html and css right so let's quickly put up the code some sample code in ide this is how the ide looks like and again you have to go to file right after going to file you can select new already there is a project so i'm selecting new once you select you will be asked which type of file you want to create you can create html file so give a name for that here i'm giving demo 2 right i'm clicking enter once that is done already a sample skeleton of html will be visible any modification you want to do you can do that right here i am naming this page has hi greetings right any elements you want to add inside that i'm using for sample t tag and i'm trying to type one simple sentence so if you want to execute you will be having options here which one you can use it's up to you either it can be edge or it can be mozilla firefox or it can also be google chrome right i'm using chrome now right so this is how it will display the title which you gave for the file is high greetings it is there and the content is i like coding so this is how html and css can be integrated in pycharm now we have come up to the last part of this video that is summary so we learnt regarding what is an ide that is integrated development environment and why do we use this id what is the necessity of it and different types of id which is available for python right so apart from that we also learned regarding pycharm especially what is pycharm and how does it work also we had different features illustrated we had a overview walkthrough first later we got into in-depth features of pycharm name it it can be key maps and shortcuts omni macros micros how to write a python code how to run the python console on python first and how to debug the elements of the code or how to put up a breakpoints to the code which you do all these things were discussed apart from that we also knew about integration of version control that means we can integrate the repositories which is available outside the pycharm to pycharm name it it can be git repository apart from that we also had an option in order to work with html css in python so we also went through a sample example of html as well and this ends the video we'll meet up in the next video thank you if you haven't subscribed for our channel yet i would request you to hit the subscribe button and turn on notification bell so that you don't miss any new updates or video releases from great learning if you enjoy this video show us some love and do like this video knowledge increases by sharing so make sure you share this video with your friends and colleague make sure you comment on this video any queries or suggestions i'll be more than happy to respond to all of them you
Info
Channel: Great Learning
Views: 17,208
Rating: undefined out of 5
Keywords: yt:cc=on, pycharm tutorial, pycharm tutorial for beginners, pycharm github tutorial, pycharm tutorial python, pycharm community version, tutorial on pycharm, pycharm, pycharm download, pycharm community edition, pycharm jetbrains, pycharm install, pycharm linux, pycharm virtualenv, pycharm community, python programming tutorial, python programming sample, python programming projects, python ide, python ide windows, best python ide linux, python training
Id: rM0bp3tTMnY
Channel Id: undefined
Length: 39min 22sec (2362 seconds)
Published: Mon Dec 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.