When working under Windows I can open as many MATLAB instances as I want (and instances of other Windows applications as well).
Can it be done with PyCharm?
I can't open more than one for now.
-
This works great and, to my mind, answers the OP's question better than the accepted answer. – Adrian Keister Jul 05 '23 at 17:31
-
@AdrianKeister what works great? – Benny K Jul 06 '23 at 07:10
-
Sorry, I commented on the wrong post! I meant @Tagrenam's answer works great. – Adrian Keister Jul 06 '23 at 13:06
3 Answers
Go to File->Settings, Appereance & Behavior -> System settings, than find line "Open project in" and set "Ask"(Settings window screenshot), now you can File -> Open recent, and you will get ability to open another project in another window.

- 144
- 1
- 4
-
This works great and, to my mind, answers the OP's question better than the accepted answer. – Adrian Keister Jul 06 '23 at 13:06
-
This works, but there are several limitations. For example, if you open a find window in one project, you cannot do anything in any other open project. It isn't like two independent pycharm applications. – Wyrmwood Aug 04 '23 at 17:09
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.

- 1,138
- 4
- 13
- 44
-
-
-
Properly explained [here](https://www.quora.com/How-can-I-use-Pycharm-to-run-two-Python-programs-simultaneously). – anatolyg Oct 13 '21 at 19:16
Yes, it can be done. Below is a walkthrough describing the necessary steps.
The problem
PyCharm isn't developed to run a second instance simultaneously, like Visual Studio does. If you try to run a 2nd instance of PyCharm by holding down the SHIFT key while you left-click on its icon, it will just show up the first (and only) instance running. I found that just cloning (copying) the entire program files location is only the first part of the solution, because you also have to tell PyCharm to use a different set of runtime configuration (such as its cache etc).
Solution
The script below will create a copy of the existing PyCharm located in the "Program Files"
directory. It will then overwrite "idea.properties"
which you need to prepare once (see description below). Important: While the developers of PyCharm know it is possible, there is no official support running more than one instance at the same time.
I have created a batch script update2ndPyCharm.cmd
. Before you use it, please read the instructions below the script:
REM Script to create 2nd instance of PyCharm from existing one
REM Written by Matt, 2022
@ECHO OFF & CLS & ECHO.
NET FILE 1>NUL 2>NUL & IF ERRORLEVEL 1 (ECHO You must right-click and select & ECHO "RUN AS ADMINISTRATOR" to run this batch. Exiting... & ECHO. & PAUSE & EXIT /D)
REM ... proceed here with admin rights ...
setlocal & pushd .
ECHO Creating and updating 2nd PyCharm instance ...
mkdir "C:\Program Files\JetBrains\PyCharm 2022.2.1 - Instance 2\" 1>nul 2>&1
xcopy "C:\Program Files\JetBrains\PyCharm 2022.2.1\*.*" "C:\Program Files\JetBrains\PyCharm 2022.2.1 - Instance 2\" /S /E /H /R /O /V /T /Y
ECHO Overwriting settings to allow 2nd instance to run ...
xcopy "idea.properties" "C:\Program Files\JetBrains\PyCharm 2022.2.1 - Instance 2\bin\" /Y 1>nul 2>&1
ECHO Done.
ECHO Now you can create a shortcut from pycharm64.exe (Explorer window will open now)
explorer "C:\Program Files\JetBrains\PyCharm 2022.2.1 - Instance 2\bin"
endlocal & popd
Steps for preparation:
Create an Update directory, for example C:\Update, create the batch file above there and copy the file
idea.properties
fromC:\Program Files\JetBrains\PyCharm 2022.2.1\bin\
into the Update directory. Check the directories in case you have a different program files location (see Important notes at the end of this answer).Use your favorite editor to open the copy of
idea.properties
. Patch the following lines (i.e. edit it: remove#
at the start of each line and ensure they look like this (keep all other values untouched):idea.config.path=${user.home}/.PyCharm_I2/config
idea.system.path=${user.home}/.PyCharm_I2/system
idea.plugins.path=${idea.config.path}/plugins
idea.log.path=${idea.system.path}/logSave and close the file. Also make sure that PyCharm is not running!
Run the batch file
update2ndPyCharm.cmd
as administrator1) (Open admin shell, cd to the directory where the batch file and the patchedidea.properties
file is). If you don't run it with admin rights, it will exit with an error message.A windows explorer will open. Create a shortcut of the file
pycharm64.exe
and put it to your taskbar or start menu. This will be your 2nd instance. The 2nd instance has the pathC:\Program Files\JetBrains\PyCharm 2022.2.1 - Instance 2
The first instance can be run from the original shortcut and has the pathC:\Program Files\JetBrains\PyCharm 2022.2.1
.
Now each instance of PyCharm has its own location, settings, and shortcut icon (the one that you have created in the last step). You now can use each shortcut icon to run an individual instance of the IDE.
How does it work?
You might have noticed that this workaround creates an independent .PyCharm_I2
folder inside the user's home directory (i.e. "${user.home}/.PyCharm_I2"
). There it creates config
, system
, plugins
and log
subdirectories at the moment you start the 2nd instance for the first time.
The original config file idea.properties
inside "C:\Program Files\JetBrains\PyCharm 2022.2.1\bin
doesn't use these path variables mentioned in step 2 (they are commented out), hence there is no conflict.
Note that - although rather theoretical - you could create more than 2 instances with this approach by cloning the program files directory again and giving the 3rd idea.properties
file different subdirectories (e.g. "${user.home}/.PyCharm_I3"
).
Important:
Each time you need to update PyCharm, you will have to update both instances individually by selecting
Help > Check for updates ...
in each instance's IDE (starting with the 2nd, then update the 1st making sure only one is running at the time).
Make sure the IDE has restarted itself and all background tasks ("Updating..." in the footer) are finished. Run "Check for updates ..." again, until Pycharm is telling you "You already have the latest version ...".
Then, run the batch scriptupdate2ndPyCharm.cmd
afterwards to restore the settings! Both IDEs must be closed when you start the script.This script was created when version
2022.2.1
was out. Update the paths of the source and destination directories in the script according to your version! Note: Once installed, this directory will never change although your version gets updated (I am already running 2022.3, but the directory is still 2022.2.1).
1) You can modify the batch script to request admin rights automatically. Just replace the top 5 lines of the script update2ndPyCharm.cmd
by the script which you can find here. (Copy everything from top of the script till but excluding the ::START
section)

- 25,467
- 18
- 120
- 187