Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch PyCharm from terminal/command prompt

How can I launch PyCharm from terminal / command prompt? I tried charm, charm., pycharm., pycharm.

None of these commands work.

Is it possible to open/launch PyCharm from a command prompt / terminal ?

like image 524
zzob Avatar asked Nov 29 '18 09:11

zzob


4 Answers

From examining the shortcut on my Ubuntu desktop (on which I have the community version of Pycharm installed) the command it runs is "pycharm-community" So this works when run in a terminal, for example:

pycharm-community &

If you are using Windows, you can use the same trick to find out where Pycharm is installed (examining the shortcut on your start menu or desktop). For me, it is:

"C:\Program Files (x86)\JetBrains\PyCharm 2016.3.1\bin\pycharm64.exe"

Running that from a git bash prompt launches Pycharm for me.

You probably want to examine your own shortcut to find the correct location on your computer.

You can find the shortcut file from the Start Menu by right-clicking on the Pycharm entry and selecting Open file location. Or you can just look at the shortcut on your desktop if you have one there.

When you have located the shortcut file, right-click it, click Properties, select the Shortcut tab, and look in the field called Target: to see the location of the Pycharm executable.

like image 180
Rob Bricheno Avatar answered Oct 17 '22 20:10

Rob Bricheno


If you are using ubuntu, go to pycharm/bin folder and run pycharm.sh file using below command

./pycharm.sh

like image 39
Bharat Jogdand Avatar answered Oct 17 '22 19:10

Bharat Jogdand


This works on macOS (should work with other OSes too):

  1. Open Application Pycharm
  2. Find tools in menu bar
  3. Click Create Command-line Launcher
  4. Checking the launcher executable file which has been created in /usr/local/bin/charm
  5. Open project or file just type $ charm YOUR_FOLDER_OR_FILE

Answer credit

like image 5
Antonio Avatar answered Oct 17 '22 19:10

Antonio


Add path of PyCharm to your environment variables.

As user @Rob Brincheno metioned

When you have located the shortcut file, right-click it, click Properties, select the Shortcut tab, and look in the field called Target: to see the location of the Pycharm executable.

For the example, let's say the path is:

"C:\Program Files (x86)\JetBrains\PyCharm 2016.3.1\bin\pycharm64.exe"

Copy all to last part, don't copy pycharm64.exe

Read this for how to add PyCharm to your environment variables.

After you add it to path, from your cmd you can execute it as last part you didn't add, just type:

pycharm64

and it will start.

like image 2
Dinko Pehar Avatar answered Oct 17 '22 19:10

Dinko Pehar