In this lesson we will go through the steps to set up Python development environment on Windows.
If you already have Python installed on your Windows device you can skip this step.
The python IDC that we will be using will be pi charm.
Idc if you prefer using a different idea e you can do so.
Another great option will be the Visual Studio code idc.
This is free and you can use multiple programming languages like Python and go.
It's becoming one of the best IDC that is out in the market for free so you can consider using this
idea as well.
Some say that the set up process is a bit confusing in my lesson.
I'll be using pi term since it's easy to set up and the visual is easy to understand which makes it
best for teaching.
But as I said you can choose any idea you prefer.
Now let's start installing python.
Open your web browser and go to HDTV Colin slash less w w w dot python.
Dot org.
Choose the download tab and click on Download Python three point seven point two button once the download
has completed you will see this tab on the left bottom of the window click on the tab to start the installer
as the open the installer.
You will see this window pop up.
I want you to make sure you put a check on ADD.
Python three point seven to pass.
If you forget to put a check on this box you will need to manually set a path later on.
Once you set the check in the box you can click on install now a message like this one may pop up click
yes and continue the process the installation may take some time.
So I will skip the process and go onto the screen where the installation has been completed we've successfully
completed that installation.
You can close this window.
Go to the start button and click on it.
Then choose command prompt in your command prompt screen.
Type in Python.
If the python shell shows on the screen.
This means you have successfully installed Python onto your computer.
Lets say we type.
Print test.
Once we hit the enter button you will see the word test.
Print it out to exit python.
Simply type.
Exit followed by a parentheses and hit enter.
You can see that the Python Shell is no longer showing.
Now let's go onto installing the page germ IDC
by term has two types of options.
The professional will cost you the licence fee.
You can see that the fee is one ninety nine per year.
If you wouldn't be using a lot of features you can stick to the community version which is free.
I'll be using the professional version in this lesson.
There may be a slight difference in the layout if you will be using the community version but I don't
think it will bother you too much.
Here we click on the download button to start the process.
This may take a while so I'll skip to the screen where the download has completed once you've finished
downloading.
You can click on this tab to launch the installer a message like this one may pop up click yes and continue
the process.
We can close the browser once this Windows pop up.
Click on next here we will determine where to install the default is set to git brain pi charm folder.
Here we will also click on Next go on hitting next until the installation process begins again.
This may take some time so I will skip to the screen where the installation process has been completed.
Here we have complete in installing pi term.
We want to immediately run pi terms so we will put a check in this box and hit the finished button.
Once the PI Jem launches you can click OK in this window hit next on the right lower corner and the
screen you will be asked if you wish to download some plugins I'll be installing and enable the idea
then if you're not familiar with vids I recommend not to install the vim may affect on how to write
your commands.
Now let's hit the start using pi charm button this window will be asking you if you want to activate
the PI tram license.
Here we can click on evaluate for free.
Now we click on evaluate button once the PI term is launched click on Create new project in this window
we will choose pure Python on the top here we can create the name of the project.
In this lesson we will be programming drones so we can set it to p y Tello with the name of the drone.
If you don't like the same feel free to change it to any project name you wish.
Next click on project interpreter.
The default setting will be set to use virtual EMV.
You may not be familiar with it so we will be using the python three point seven point two which we
just installed.
Jews existing interpreter and click on the dots.
Now choose system interpreter located on the left side.
The default interpreter will be showing the one we just installed.
If it is not set as an interpreter click on the dots to manually set the path.
Once we are done setting the interpreter here.
OK.
As you see that the existing interpreter is set as Python 3 you can click on Create.
You may find this tutorial window but we'll just skip it here.
I want you to check the left side corner of the screen where you will find P Y tallow which is the project
name we created earlier.
Right click on the P Y Tello and choose new then choose new python file let's get the file name to Main
and press OK under the P Y Tello folder you will find the new file name dot P Y in this file we will
set print test to run this code.
We need to set the configuration on your right corner.
You will find add configuration click on it to open up this window click on the plus button and choose
python.
You can set the name to whatever is easy for you to understand.
In this example I will set it to go.
Now we need to choose the script path.
If you click on that file icon on the right you will see main dot P Y which we created earlier.
Now press open.
Check to see if the Python interpreter is set to Python three point seven.
If it is all correct click OK.
After you added the configuration you will see a tab with go and agreeing try and like on.
On the right corner once you click on this green triangle the process will start.
You will find the results of your script on the bottom of the screen.
I also want to introduce you to the debugger function.
Let's set a variable a with 10 and print a.
You can click the blank next to the number and you will see this red circle appear.
Now go onto the right corner to find a bug shape button once you press this button.
You will be in debugger mode.
The process will stop at the breakpoint which is where you set the red circle.
You can see the value set in variable a and also see the result showing the bottom of your screen you
can use this debugger mode to check how the script is processing and also find any errors that you may
have made.
Let's hit the red square button to stop debugger mode and also don't forget to click on the breakpoint
to delete it in the lessons we will mainly be using the screen button to run the script and the debugger
about these features will be supported in the community version.
So for those of you who will not be using more features you don't have to get the professional version
although we've completed all the steps.
There are a few more setting changes that I will make for you so you can see my script better.
If you prefer these changes.
Feel free to adjust your settings as well.
Now go on to the left top corner two files choose settings and here choose appearance for the theme.
Choose high contrast next head apply.
You can see the color change.
Now choose Intel E.J. and hit apply.
You'll see that the entire screen changed to a brighter color.
Also I will go on to choose editor here I'll choose font and change the font size to 30 as I hit the
play button.
You can see that the font size became larger choose key map and search run using the search bar.
You can find run and the default chalky key set to shift F ten I can change the settings by double clicking
on run choose keyboard shortcut here I will change the shortcut to control F and set the second stroke
also just stroke f then hit OK if you've already set a shortcut key you may get this morning in my case
I will want to run the script with control F so I'll choose remove.
Now we hit the okay button to go back to the script earlier I had the green triangle button to run the
script as we set the shortcut key I can type control F twice and you will see the results printed out
without hitting the green triangle.
Now let's go to view on the top left of the screen here you will find toolbar.
Once you click this you will see that the buttons have moved to the left side here.
You will also see some more functions.
OK.
Finally we completed setting up the environment.
So now let's go on to the next lesson and start programming the drones.