PYTHON TUTORIAL | PYTHON BASICS ON UBUNTU LINUX | How to get started with Python on Ubuntu?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to this video so my question for you today is why e-learning Python if you've got anything interesting to say then please leave a comment down below I'd love to hear from you and I will see you in a moment so if you wanna bin to what we're going to do is we're going to hit the windows button and we're going to go to our terminal now I've actually changed some of the default settings on my terminal so it gets big like this by default it's maximized you'll probably won't do that anyway so I'm abun - I believe don't quote me on this I think Python 2 comes by default and you can actually check this the following way if you type in Python version sorry if you type in personal version like this you'll get your Python 2 version in my case it's 2.7 point 17 but what we want of course is Python 3 but you can do that exactly the same way by just adding a 3 at the end of this Python 3 python version thing so I've got Python 3 point 6 point 9 and if you don't have that installed I'm not sure what message would have come up the probably would have said you can install Python or you just don't have Python installed I don't know so if you haven't got it installed and let's get going right so what you want to do is again in the terminal we're just going to do an update first so we're going to do sudo apt-get update just like this and then you want to put in your password which you've probably set up and this is just going to fetch a whole bunch of stuff from the bunty to make sure all our packages are up-to-date before we do anything so I'm quite surprised by that ok so next step we've got our update now we want to do sudo apt-get up install now if you're not used to Linux then you could just press the UP button on the terminal and that will actually take you to the last command that you executed so sudo apt-get install and what do we want to install we want to install Python 3 and just like that I think it should be ready to use but we're not quite done yet we also want to install pit and is really cool it's pythons own package manager' and what it's going to do it's just going to allow you to easily install libraries for your Python free version in the future and what's great about it of course is that whether you using Windows or Linux or Mac OS by using the Python pip installer it actually it doesn't matter it's kind of a it's platform-independent you know you will just be able to do a pip install a new installer phone whichever environment you're working in so on top of that we actually want something else as well we want Python 3 and it's called dev now you don't need to worry about this but we will need this later if you're interested in learning and some machine learning and computer vision in particular so let's download those two things and I should be super quick and that's all the downloads done so now that all our downloads are done what we want to do is we want to do a few we're going to be doing using a few Linux commands so firstly we're going to do this make directory which is just going to create a new folder for us and I'm going to call it basics now you can call it Python scripts or just Python files it doesn't really matter so we've made this directory and if I click list we can actually see it over here on the left-hand bottom left hand side and with CD which stands for change directory another another linux command we're just going to go into this basics directory or folder whichever you like to call it now using the list command again you can see that directories empty of course because we created that empty so what we want to do is use a touch command to just put in a Python file and we're going to call it hello dot pi whoops that's hello dot pull but it will actually create that so we need to remove that so we're going to use the RM which stands for remove and we're just going to we're going to try that again but this time we're going to type hello dot pi and if we list now we're going to have this hello dot PI file so at this point what you could really do is you could go into if you're not used to the command line you could go into the folder you've created and then you can open this with your favorite editor you know whether it's sublime or just a text editor Emacs it doesn't matter too much or them I'm going to use emacs from my command line so we're going to open this and it's going to open an empty file and it's just a text editor so in here we can now finally do our print statement in which we're just going to do hello world which is the hello world example everyone does and it's going to be a very first Python script executed on the command line of Ubuntu and we do that by calling Python 3 that's the program and what what do we want to execute we want to execute hello dot PI and just like that we've actually just printed we've just executed our first Python script on Ubuntu so hopefully that was useful again leave a comment as to why you're learning Python I would love to know subscribe and like and I'll see you next video
Info
Channel: Monkhaus
Views: 80,447
Rating: undefined out of 5
Keywords: python, python basics, python tutorial, python on ubuntu, python linux tutorial, how to install python on ubuntu, how to install python on linux, python3, install python3 linux, python3-pip, python pip install, python programming, basic programming, programming basics, basics of python programming, pthon, simple python program, python ubuntu tutorial
Id: fM7_w_hgEO8
Channel Id: undefined
Length: 5min 20sec (320 seconds)
Published: Mon Jan 27 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.