+ - 0:00:00
Notes for current slide
Notes for next slide

Create your first Python project

Priyanga Dilini Talagala

https://prital.netlify.com/

1 / 16

Prerequisites

  • Make sure you're using PyCharm Community or Professional.

  • Make sure you've already installed Python. Python is already installed on your computer if you're running macOS or Linux. Python can be downloaded from python.org.

  • Let's develop a Python script to get started with PyCharm.

2 / 16

Creating a Python project

3 / 16
  1. Click New Project if you're on the Welcome screen.

4 / 16

Choose File -> New Project from the main menu if you already have a project open.

5 / 16

Although PyCharm may be used to create a variety of projects, we'll use it to create a simple Pure Python project in this tutorial. This template will start with an empty project.

  • Choose a location for the project. Select the directory for your project by clicking the Browse button next to the Location field.

  • Give a name for the project

6 / 16
  • According to Python best practices, each project should have its own virtualenv.

  • PyCharm creates a fresh virtual environment for you most of the time, and you don't have to do anything. You can still see and change the venv options. Select a tool to construct a new virtual environment by expanding the Python Interpreter: New Virtualenv Environment node. Select the Virtualenv tool and enter the environment's location as well as the base Python interpreter for the new virtual environment.

7 / 16
  • The path to the Python executable must be specified when establishing the base interpreter. PyCharm offers two alternatives if it detects no Python on your machine: download the latest Python versions from python.org or specify a path to the Python executable (in case of non-standard installation).

  • Refer to Configure a Python interpreter for more details.

  • Now click the Create button at the bottom of the New Project dialog.

  • If you already have a project open, PyCharm will ask if you want to create a new project in the current window or in a new one once you click Create. Choose Open in current window to close the current project, although you can return to it later.

8 / 16

Opening a project

9 / 16
  • On the Welcome Screen, click the Open link.

  • From the main menu, select File --> Open.

10 / 16

Reopening recent projects

  • PyCharm keeps a history list of recent projects from which you can choose the one you want.

  • When PyCharm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings/Preferences dialog.

11 / 16

Closing projects

If you need to close only one project, you can either close the project window or select File --> Close Project from the main menu.

12 / 16

Remove a project from the list of recent projects

13 / 16
  • Click the closing icon for the project to remove.

  • The selected project will be removed from the list of the recent project in the Project window and on the Welcome screen.

14 / 16
  • To remove a project only from the list on the Welcome Screen, right-click the target project and select Remove Selected from Welcome Screen.

15 / 16

pridiltal

Acknowledgements:

This work was supported in part by RETINA research lab funded by the OWSD, a program unit of United Nations Educational, Scientific and Cultural Organization (UNESCO).

Key References

All rights reserved by Priyanga D Talagala

16 / 16

Prerequisites

  • Make sure you're using PyCharm Community or Professional.

  • Make sure you've already installed Python. Python is already installed on your computer if you're running macOS or Linux. Python can be downloaded from python.org.

  • Let's develop a Python script to get started with PyCharm.

2 / 16
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow