I want to set up PyCharm to work on a set of Python projects in a single window.
Lets say I have this projects structure.
~/src
├── py_project1
├── py_project2
├── py_project3
├── other_lang_proj1
└── other_lang_proj2
A system PYTHONPATH of /Library/Python/2.7/site-packages:/usr/local/lib/python2.7/site-packages:/opt/proprietary/packages
and some packages at
/opt/proprietary/packages
├── project1
├── project2
└── project3
How do I add the ~/src/py_project*
projects to a single PyCharm window and have them see all of the packages in PYTHONPATH and /opt/proprietary/packages/project*
?
Moving directories is not optional, and I don't want virtualenv. I want to configure PyCharm once for all of the open projects. For the record the PYTHONPATH works just fine for this setup everywhere but PyCharm.
Open multiple projects Then, depending on the option selected in the Project Opening section of the System Settings page of the Settings/Preferences 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.
Considering the thread from their official website which can be found here, you can open multiple instances only if they use separate config/system directories (this can be configured in idea. properties inside the PyCharm installation directory). Alternatively, you can open multiple frames in one PyCharm instance.
Create new files In the Project tool window Alt+1 , select the directory or package in which you want to create a new file, and then choose File | New from the main menu. Right-click the corresponding directory or package and select New from the context menu. Press Alt+Insert .
Whatever you do in PyCharm, you do that in the context of a project. A project is an organizational unit that represents a complete software solution. It serves as a basis for coding assistance, bulk refactoring, coding style consistency, and so on. Once you have opened a folder in PyCharm, the .
The accepted answer works and was probably the only way to achieve opening multiple projects when the answer was authored. However, adding a new content root simply adds the files in the underlying directory to the open project. Project settings such as the Python interpreter have to be shared between content root folders.
At the time of writing, PyCharm genuinely supports multiple projects in a single window. This allows different projects to be configured differently.
The official help document contains a step-by-step guide with screenshots on how to open multiple projects in a single PyCharm window.
You can add directories to one, for example. Let's say you have ~/src/py_project1 open as a project. go to settings -> project: -> project structure then +Add Content Root, and add the directories one at a time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With