Getting back to the process of creating a PyCharm project from scratch, let's get started:
- After choosing the Create New Project option in the welcome window, you will be prompted to select the type of project you'd like to create. This step is used to specify which general project you are working on, where you'd like to store the project, and which interpreter/environment to use. The prompt in which you can select your project type is as follows:
Creating a PyCharm project
If you are using the Community edition, you will not see the left-hand side of the window that's shown in the preceding screenshot. Don't panic, as that feature is used to create boilerplate files for specific types of Python projects (such as Django or Flask), which can also be generated manually without any difficulty in the Community edition anyway.
Furthermore, in this section, we are creating a Pure Python project, which can be done using Community PyCharm. If you are a Professional PyCharm user, also ignore the left panel for now.
Furthermore, in this section, we are creating a Pure Python project, which can be done using Community PyCharm. If you are a Professional PyCharm user, also ignore the left panel for now.
- As such, go ahead and choose a name for your PyCharm project by changing untitled to whatever name you wish in the Location prompt. As suggested by its name, this option also allows you to specify the location of your project. In the following screenshot, I am naming this project FirstProject:
Project specifications
- Also notice that, once you click on the Project Interpreter prompt in the middle of the window, PyCharm will expand that section out, as shown in the preceding screenshot. Here, you can specify which interpreter PyCharm should use to execute the code in the project you are creating. You can see that I am choosing the option to use my global Python interpreter (stored in /usr/local/bin/python3.7 by default in macOS; yours might be different) by selecting the Existing interpreter option.
The default option is to create a completely new virtual environment for your Python project. We will look into the specification of virtual environments and interpreters later in the next chapter, in the Virtual environments and interpreters section. For now, simply choose your own global Python interpreter for this project we are creating
Now, since we've created a project, let's see how we can work with it within PyCharm.