Search code examples
pythonpycharmparallels

running two python script in parallel in pycharm


I have looked at this question but I am not sure I got it correctly or not.

I have opened pycharm and one python script and its running (it's topic modeling).

Also I have another python script in which I opened in another pycharm in the same server. I also run it.

Now these two program are running in the same server, I should mention that I have not changed any configuration neither server nor pycharm.

Do you think its ok in this way? or one script technically won't run(in terms of progressing I mean it just show its running but practically wont run) until the other script finished?


Solution

  • First, PyCharm will create independent processes on the server, so both scripts will run. You can check it with something like htop - search for processes and verify that they're running.

    Second, you don't have to open second PyCharm window to run the second script. You can run both of them from the single one. There are at least two ways: with run configurations or by spawning multiple terminal windows and running scripts from there.