Pycharm has a default project location (which might depend on the PyCharm version and/or OS). At least in some cases it’s ~/PyCharmProjects
.
Note that this default location shows up just as a suggestion when a new project is created, but one can choose a different location.
It’s also possible to change the default project location, see Change the default location of Pycharm Project
Pycharm also support creating projects from code already existing in some directory, in which case the above-mentioned suggestion is not even made.
With these in mind, if you really want to find all PyCharm projects you’d need to do a search for the .idea
directories in which PyCharm stores its per-project settings.
But note that several other JetBrains Idea-based products beside PyCharm use the same directory name for the same purpose, so, if you have other such products installed you’d need to take a closer look to see which of such projects are PyCharm projects. An explanation for what’s in that directory can be found in How to manage projects under Version Control Systems (applicable to all of their Idea-based products, not just PyCharm)
If you open your project for the very first time, you see the Welcome Screen. You can either open your project from the disk, or download it from the version control system.
Opening a project
Open your project from disk
-
Do one of the following:
-
From the main menu, select .
-
On the Welcome Screen, click Open.
-
-
In the Open File or Project dialog that opens, find the location of the desired project directory. The PyCharm projects are marked with
and projects created in other IDEs or in a dedicated editor are marked with
.
If you select a non-PyCharm directory, PyCharm creates a new IDE project and sets up a Python interpreter.
-
Click Open (on Mac) or OK (on Windows).
Open a project from Git
-
Do one of the following:
-
On the Welcome Screen, click Get from Version Control.
-
From the main menu, select .
-
-
Select the version control system where your project is stored. Here it is Git:
-
Specify the path to the repository and select the directory to which a project will be cloned. Alternatively, you can select GitHub on the left, login using your credentials, and select any project you want to work with.
-
Click Clone.
Open a project from the command line
-
In the command prompt, type:
<PyCharm> <path_to_the_project folder>
See Open files from the command line for more information.
Once you have opened the project, you should configure Python interpreter for it, and set up your project.
If your project was previously configured with any interpreter that is not currently available, PyCharm shows a warning and provides two options: select an interpreter that fits the previous configuration or configure another Python interpreter:
Note, when you open a project configured for the outdated version of the Python interpreter, the following message appears: Click Configure Python interpreter to set up a valid one.
You can close a project that has been added to the currently opened one (primary project).
Managing multiple projects
PyCharm suggests the following alternatives to work with several projects simultaneously:
-
Each project is opened in its own window. The projects are independent and cannot share information, except for the Clipboard operations. All the projects run in the same instance of PyCharm and use the same memory space.
-
A newly opened project shares the same window as the already opened one. The project that has already been opened is considered the primary project, and is always shown first in the Project tool window. All the other projects are attached to the primary project. You can import classes and methods from dependent projects
Open multiple projects
-
Open a project, while another one is already opened.
Then, depending on the option selected in the Project Opening section of the System Settings page of the Settings dialog (Ctrl+Alt+S), PyCharm can ask you for the following alternatives:
-
If the New Window option is selected, the new project silently opens in a new window. The Attach option appears in the menu.
-
If the This Window option is selected, the new project silently opens in the same window, replacing the currently opened project. The Attach Project command appears in the menu.
-
If the Attach option is selected, PyCharm attaches the new project to the currently opened project. The project that has already been opened is the primary project.
-
Merge project windows (macOS)
On macOS, you can merge all opened project windows into one, turning them into tabs.
-
Make sure that there are several PyCharm projects opened in separate windows.
-
From the main menu, select .
Drag a project’s tab to work with the project in a separate window again.
Manage project dependencies
-
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Project Dependencies.
-
Select a project in the Projects pane, than select the checkboxes to the left of the names of the desired projects to add them as dependencies.
-
Use the arrow buttons
to change the order of the dependent projects, in which they appear in the
PYTHONPATH
variable.
Some settings (such as Django, Google App Engine, template languages, Python interpreters, content roots) can be configured separately for each project.
You can close a project that has been added to the currently opened one (primary project).
Remove a project from view
-
In the Project tool window, right-click the project to be deleted.
-
From the context menu of the selection, choose Remove from Project View or press Delete:
When PyCharm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings dialog (Ctrl+Alt+S).
Reopening recent projects
PyCharm keeps the history list of the recent projects, from which you can select the desired one.
When PyCharm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings dialog (Ctrl+Alt+S).
Open a recent project
-
Call from the main menu and select the desired project from the list.
Note that the list also contains the projects that share one window.
Specify whether you want to open the project in a new window, reuse the current window, or attach it to the currently opened project.
-
On the Welcome screen, click Projects on the left-hand pane and then select the project of interest in the right-hand pane where the list of your recent projects is shown. Start typing in the Search projects field to filter the list of recent projects.
Closing projects
If you need to close only one project, you can either close the project window or select from the main menu.
If you work with multiple projects, use the following actions to close many projects at once:
Close all projects
-
From the main menu, select .
This action closes all projects that are currently opened in PyCharm.
Close all but the current project
-
From the main menu, select .
This action closes all opened projects except the current one.
When you have only one open project and you close it, PyCharm displays the Welcome screen. In case of multiple projects, each one is closed with its frame.
Remove a project from the list of recent projects
-
Click on the menu, then click Manage Projects at the very bottom of the recent project list.
-
Click the
icon next the project that you want to remove.
The selected project will be removed from the list of recent projects in the Recent Projects menu and on the Welcome screen.
Switching between projects
To switch between open projects, you can use the following commands of the menu:
-
Ctrl+Alt+]
-
Ctrl+Alt+[
Last modified: 16 March 2023
У Pycharm есть местоположение проекта по умолчанию (которое может зависеть от версии PyCharm и / или ОС). По крайней мере, в некоторых случаях это ~/PyCharmProjects
,
Обратите внимание, что это местоположение по умолчанию отображается в качестве предложения при создании нового проекта, но можно выбрать другое местоположение.
Также можно изменить местоположение проекта по умолчанию, см. Изменение местоположения проекта Pycharm по умолчанию.
Pycharm также поддерживает создание проектов из кода, уже существующего в некотором каталоге, и в этом случае вышеупомянутое предложение даже не делается.
Имея это в виду, если вы действительно хотите найти все проекты PyCharm, вам нужно выполнить поиск .idea
каталоги, в которых PyCharm хранит настройки для каждого проекта.
Но обратите внимание, что некоторые другие продукты на базе JetBrains Idea, кроме PyCharm, используют одно и то же имя каталога для той же цели, поэтому, если у вас установлены другие такие продукты, вам нужно более внимательно посмотреть, какие из таких проектов являются проектами PyCharm. Объяснение того, что находится в этом каталоге, можно найти в разделе Как управлять проектами в системах контроля версий (применимо ко всем их продуктам на основе Idea, а не только к PyCharm).
Pycharm имеет местоположение проекта по умолчанию (которое может зависеть от версии PyCharm и/или ОС). По крайней мере, в некоторых случаях это ~/PyCharmProjects
.
Обратите внимание, что это местоположение по умолчанию отображается как предложение, когда создается новый проект, но можно выбрать другое местоположение.
Также можно изменить местоположение проекта по умолчанию, см. Изменение расположения по умолчанию проекта Pycharm
Pycharm также поддерживает создание проектов из кода, уже существующего в каком-то каталоге, и в этом случае вышеупомянутое предложение даже не сделано.
Помня об этом, если вы действительно хотите найти все проекты PyCharm, вам нужно будет выполнить поиск .idea
в которых PyCharm сохраняет свои настройки для каждого проекта.
Но обратите внимание, что несколько других продуктов на основе JetBrains Idea рядом с PyCharm используют одно и то же имя каталога для этой же цели, поэтому, если у вас есть другие такие продукты, вам нужно будет поближе посмотреть, какие из таких проектов являются проектами PyCharm. Объяснение того, что в этом каталоге можно найти в разделе «Управление проектами в системах управления версиями» (применимо ко всем их продуктам на основе Idea, а не только к PyCharm)
Pycharm имеет местоположение проекта по умолчанию (которое мог бы зависит от версии PyCharm и / или ОС). По крайней мере, в некоторых случаях это ~/PyCharmProjects.
Обратите внимание, что это местоположение по умолчанию отображается как предположение при создании нового проекта, но можно выбрать другое местоположение.
Также возможно изменить местоположение проекта по умолчанию, см. Измените расположение по умолчанию для проекта Pycharm
Pycharm также поддерживает создание проектов из кода, уже существующего в каком-либо каталоге, и в этом случае вышеупомянутое предложение даже не делается.
Имея это в виду, если вы действительно хотите найти проекты PyCharm все, вам нужно будет выполнить поиск каталогов .idea, в которых PyCharm хранит свои настройки для каждого проекта.
Но обратите внимание, что несколько других продуктов на основе JetBrains Idea, помимо PyCharm, используют то же имя каталога для той же цели, поэтому, если у вас установлены другие такие продукты, вам нужно будет внимательнее посмотреть, какие из таких проектов являются проектами PyCharm. Объяснение того, что находится в этом каталоге, можно найти в Как управлять проектами в системах контроля версий (применимо ко всем их продуктам на основе Idea, а не только к PyCharm)