‫Welcome back.
‫In this video, I would like to show you how to install Python and the necessary libraries in order
‫for you to be able to run the simulations in Python.
‫If you have Ubuntu 20.04 like I have it here, then python 3.8 should come by default along with numpy.
‫You can check the version in terminal like this.
‫Python three and then two dashes and then version.
‫So you see I have python 3.8.5 and you can check the version of numpy like this Python three dash.
‫See then you put here a quotation mark, import numpy semicolon print and then you're going to put here
‫num py dot then you have two underlines here and then you're going to put version, then another two
‫underlines and then another quotation mark here.
‫So here I have known py 1.7.4.
‫That's what I received by default.
‫These two things I received by default when I installed my Ubuntu 20.04.
‫If you don't have python 3.8, then you can install it with these commands.
‫Sudo apt update.
‫Then you put your password here.
‫So it will give you some upgrades and then you will write sudo which is superuser then apt install software.
‫Dash properties dash common.
‫Then I'm going to write sudo add dash.
‫APT repository ppa colon dead snakes.
‫Then slash and ppa.
‫So I'm going to press enter and then I'm going to write sudo apt and then update then sudo apt install
‫python 3.8 and then to check the version you write Python three, dash dash version.
‫And then if you don't have numpy, you can add it like this sudo apt update then sudo apt install python
‫three dash.
‫Pip pip is a python package installer, so you check the version of your pip.
‫So pip for python three would be pip three, then dash dash and then version.
‫So here it is.
‫And now you write pip three install py.
‫And now you write pip three install mad plot lib to equal signs.
‫And now you can run the code.
‫But this is very important.
‫You have to run it in Linux terminal or Windows Command prompt.
‫Do not use ides like Spider or Jupyter Notebook.
‫The animation does not want to work well in there.
‫The most robust way is to run it from terminal or from Windows Command prompt.
‫So I have a file here.
‫Calculus sym pid train dot pi and I want to run it.
‫So in my terminal I will go to my desktop.
‫So change directory or CD desktop enter.
‫I can see all my stuff here with an LZ command.
‫And so in order to run this file, I'm going to write Python three and then calculus sym pid train py
‫and there you go.
‫It works.
‫So that has been in Linux.