Quick Links
New to programming in Python and not sure where you should start?
We’ll help you set it up with much less hair loss as a side effect.
If youre using Linux, you’ve got the option to find Python using the system package manager.
Hannah Stryker / How-To Geek
Checking Python on Windows
Hold down Win+R and then pop in PowerShell (without the quotes).
Hit Enter, and the PowerShell window should pop up.
Checking Python on macOS
Press the CMD+Space keys and throw in Terminal (without the quotes).
Hit Enter, and the Terminal window will pop up.
Installing Python on Linux
Depending on your distribution, Python may already be installed.
If not, youll need to tune up your essential packages.
This is the simplest method for me, personally.
Use your terminal to navigate to where your downloaded files go.
Once youve downloaded the installation file, its a simple matter of running it.
For now, well just select Python since its all were interested in.
Things may take some time to download, depending on your internet speed.
When the installation is done, we should be ready to jump in.
Testing Python Support
Once weve installed VS, we want to test whether it works with Python.
To do this, we open VS, press Continue Without Code, " and then hit Alt+i.
In the empty window that follows, we jot down 2+2 (without the quotes).
The result we get should be 4 (at the bottom of the window).
Installing Visual Studio for Linux
Sadly, VS is unavailable for Linux, but don’t despair.
Linux users can instead install Visual Studio Code for their Python programming.
Open VS from your preferred startup icon.
Hit Create New Project.
In the window that follows, we select Python system and hit Next.
We configure the project and hit Create.
Well be presented with an empty project to start our Python programming in.
Congratulations on setting up Python to work with VS!
We start by typing:
codewhich will start VS Code and give you the “Welcome” screen.
You should since it makes your coding a lot easier by automating a lot of the process.
And that’s it!
You now have a fully-featured IDE set up to run in Linux.
Keep in mind that Visual Studio and Visual Studio Code are different IDEs.
While many things are similar they are not the same.
Most professional Python developers opt forPyCharm, which is a dedicated Python IDE.