How To Fix PyCharm Cannot Start Issue

I use the PyCharm community edition for python development sometimes, but recently when I launch it, it shows a dialog and then exits like a flash. I was confused with this for some time. And now I found how to fix it, I will share the solution in this post.

1. How To Fix PyCharm Cannot Start Steps.

  1. My OS is macOS, but the steps are similar to Windows and Linux OS.
  2. Open a macOS Finder, click the Applications item on the left side.
  3. Find the PyCharm CE icon on the right side, right-click it, and click the Show Package Contents menu item in the popup menu list. Then it will display the PyCharm CE app content in the macOS Finder window.
  4. Expand the MacOS folder in the /Applications/PyCharm CE.app folder. There is a file which name is pycharm.
  5. If you want to go to the /Applications/PyCharm CE.app folder in the terminal by command line, you should add two single quotes to the PyCharm CE.app folder like this /Applications/’PyCharm CE.app’

    $ cd /Applications/'PyCharm CE.app'
    
    $ pwd
    /Applications/PyCharm CE.app
    
  6. Or you should add a backslash before the white space in the folder path like below.
    $ cd /Applications/PyCharm\ CE.app
    $ pwd
    /Applications/PyCharm CE.app
    
  7. Open a terminal and drag the file /Applications/PyCharm CE.app/Contents/MacOS/pycharm from the macOS Finder window to the terminal, press Enter key on the keyboard then you will get the below output.
    $ /Applications/PyCharm\ CE.app/Contents/MacOS/pycharm 
    2021-03-03 18:37:06.575 pycharm[3733:100354] allVms required 1.8*,1.8+
    2021-03-03 18:37:06.583 pycharm[3733:100360] Current Directory: /Users/songzhao
    2021-03-03 18:37:06.584 pycharm[3733:100360] Value of PYCHARM_VM_OPTIONS is (null)
    2021-03-03 18:37:06.584 pycharm[3733:100360] Processing VMOptions file at /Users/songzhao/Library/Application Support/JetBrains/PyCharmCE2020.3/pycharm.vmoptions
    2021-03-03 18:37:06.585 pycharm[3733:100360] Done
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    Error opening zip file or JAR manifest missing : /Applications/PyCharm.app/Contents/bin/jetbrains-agent.jar
    Error occurred during initialization of VM
    agent library failed to init: instrument
  8. From the above output, we can see the error has occurred when processing the VMOptions file at /Users/songzhao/Library/Application Support/JetBrains/PyCharmCE2020.3/pycharm.vmoptions
  9. Open a macOS Finder window, click Go —> Go to Folder… menu item and input the folder path /Users/songzhao/Library/Application Support/JetBrains/PyCharmCE2020.3 in the popup dialog input text box, then click the Go button.
  10. Find the pycharm.vmoptions file in the above folder and move it to trash.
  11. You can also run the below command to go to the above folder in a terminal and remove the pycharm.vmoptions file.
    $ cd /Users/songzhao/Library/Application\ Support/JetBrains/PyCharmCE2020.3
    
    $ ls -l
    total 16
    drwxr-xr-x   3 songzhao  staff   96 Mar  3 14:35 codestyles
    drwxr-xr-x   4 songzhao  staff  128 Mar  3 14:35 eval
    drwxr-xr-x   3 songzhao  staff   96 Mar  3 14:35 event-log-whitelist
    -rw-r--r--   1 songzhao  staff   81 Mar  3 14:35 migrate.config
    drwxr-xr-x  20 songzhao  staff  640 Mar  3 14:35 options
    -rw-r--r--   1 songzhao  staff    0 Mar  3 14:34 port.lock
    -rw-r--r--   1 songzhao  staff  590 Mar  3 14:35 pycharm.vmoptions
    drwxr-xr-x   6 songzhao  staff  192 Mar  3 14:35 tasks
    drwxr-xr-x   4 songzhao  staff  128 Mar  3 14:35 workspace
    
    $ rm -rf ./pycharm.vmoptions
  12. Now you can start the PyCharm CE version successfully by clicking the PyCharm CE app icon in the Applications folder or by executing the command $ /Applications/PyCharm\ CE.app/Contents/MacOS/pycharm in a terminal command line.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.