In our prev post, we have seen how to setup python on windows machine.
There are several editors available including command prompt to run python, in which Pycharm is one of the popular editor.
Jetbrains provides Pycharm editor [community edition] free of cost.
Download & install
Navigate to pycharm for windows link
Click on download under community edition section and install
Find
Windows OS -> Navigate to Start | All Programs | JetBrains
Mac OS -> Spotlight search & type “pycharm” & enter, to
open Pycharm editor
New Python project
Click on New Project
You can name anything other than “pythonProject”
Chose the “Virtualenv” as new env & leave the venv settings as it is
This will make sure the python libraries will be installed on current project directory.
New Python file
RIght click on the left panel or On editor, File | New … | Python File
Note : Python file can also be created under Python package
File | New… | Python Package, enter a package name [all in small letters]
and then Right click on the package | New | Python File
let’s say python file is – sample.py
x = 10 print(x) print("welcome to qavbox")
Run python
Open the terminal from the project directory, even there is a inbuilt terminal under PyCharm
Right click on the project > Open in terminal, type
python3 sample.py
for windows – python sample.py
That’s all about a beginner’s guide to pycharm.
If you want to explore some more python editors, refer popular python editors
4 Comments