How to Install PyCharm on Ubuntu 22.04

PyCharm is an IDE developed by JetBrains. It’s used for programming in the Python language, and comes with some convenient features like the ability to connect to a database, create virtual environments, and more. In this tutorial, we will learn how to install PyCharm on Ubuntu 22.04. You will see how to install with Snap package, the official download, flatpak, and with GUI.

Installing PyCharm Using Snap

To install PyCharm on Ubuntu using snap command, use any of the methods below, depending on the version you want to install:

Option 1. To install PyCharm Community version:

$ sudo snap install pycharm-community --classic

Option 2. To install PyCharm Educational version:

$ sudo snap install pycharm-educational --classic

Option 3. To install PyCharm Professional version:

$ sudo snap install pycharm-professional --classic

Once done, you can open up PyCharm from the terminal, depending on the version you have installed:

$ pycharm-community
$ pycharm-professional
$ pycharm-educational

Installing PyCharm Using Official Archive

If you don’t want to use the Snap method, you can download PyCharm from the official website and install it manually.

Step 1. Go to the PyCharm website and download the latest PyCharm version. For this tutorial we will download the community version.

Step 2. Extract the downloaded file with tar.

$ tar -zxvf pycharm-community-*.tar.gz

Step 3. Move the files to the /opt directory.

$ sudo mkdir /opt/pycharm-community/
$ sudo chmod 777 /opt/pycharm-community/
$ mv pycharm-community-*/* /opt/pycharm-community/

Step 4. Link the executable to start PyCharm from the terminal.

$ sudo ln -sf /opt/pycharm-community/bin/pycharm.sh /usr/bin/pycharm-community

Step 5. Next, we will create a desktop shortcut. Create the following file:

$ sudo nano ~/Desktop/pycharm-community.desktop

Step 6. Copy and paste the next desktop entry.

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/opt/pycharm-community/bin/pycharm.svg
Exec="/opt/pycharm-community/bin/pycharm.sh" %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce
StartupNotify=true

Now you can use your desktop shortcut to launch PyCharm Community edition.

Installing PyCharm Using GUI

Step 1. Open the Ubuntu Software application. You can do this by going to the Activities menu and searching for ‘Ubuntu Software’.

Opening Ubuntu Software through Activities Menu
Opening Ubuntu Software through Activities Menu

Step 2. Now, go ahead and search for PyCharm. Then, choose the version you’d prefer to install.

Searching for PyCharm on Ubuntu Software
Searching for PyCharm on Ubuntu Software

Step 3. And finally proceed to install PyCharm.

Installing PyCharm on Ubuntu
Installing PyCharm on Ubuntu

Step 4. To open it, simply go to the Activities menu and search for ‘PyCharm’.

Opening PyCharm through Activities Menu
Opening PyCharm through Activities Menu

Installing PyCharm Using Flatpak

To install PyCharm using flatpak, simply execute:

$ sudo apt install flatpak
$ flatpak install https://dl.flathub.org/repo/appstream/com.jetbrains.PyCharm-Community.flatpakref

Uninstalling PyCharm From Ubuntu

For the snap and GUI method:

$ sudo snap remove pycharm-community --classic
$ sudo snap remove pycharm-educational --classic
$ sudo snap remove pycharm-professional --classic

For the official archive method:

$ sudo rm -R /opt/pycharm-community/
$ sudo rm ~/Desktop/pycharm-community.desktop

For the flatpak method:

$ flatpak uninstall --delete-data com.jetbrains.PyCharm-Community

Leave a Comment

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