How to Install PyCharm IDE on Linux Mint 20

PyCharm is a dedicated Python graphical IDE (Integrated Development Environment) popular amongst Python developers with its wide range of essential tools such as analyzing code, debugging, and integration. The IDE also comes with the command line, connects to a database, creates a virtual environment, and manages your version control system (Git).

IIn the following tutorial, you will learn how to install PyCharm Community, Professional or Educational, with Flatpak or Snapcraft (Snap) on Linux Mint 20.

Prerequisites

Update Operating System

Update your Linux Mint operating system to make sure all existing packages are up to date:

sudo apt update && sudo apt upgrade -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:


sudo whoami

Example output showing sudo status:

[joshua@linuxmint ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on Adding a User to Sudoers on Linux Mint.

To use the root account, use the following command with the root password to log in.

su

The tutorial will be utilizing the terminal, and for those unfamiliar, this can be found in your show applications menu.

Example:

How to Install PyCharm IDE on Linux Mint 20

Install Python Dependencies

To ensure that the IDE can successfully load, you must have Python 3.8 or higher installed on your system. If you are using Python versions already, this can be skipped.


sudo apt install python3 python3-dev python3-distutils -y

Failure to install these may affect loading PyCharm if you skipped and noticed the error return and run the command above.

Option 1 – Install PyCharm with Snapcraft

The first option is to use the Snap package manager to install all three versions of PyCharm IDE and are arguably the most up-to-date package managers.

Snap is not installed on Linux Mint, and the developers of Linux Mint frown upon Snap a bit which is unusual given they are using the downstream Ubuntu versions and have done some locking you need to sort out first.

To install Snap, first, use the following command.

sudo mv /etc/apt/preferences.d/nosnap.pref ~/Documents/nosnap.backup

The above commands removed the lock put in place by Linux Mint.

To install Snap, use the following command:


sudo apt install snapd -y

When you have returned to your system, start the snapd service and enable automatic startup.

sudo systemctl enable snapd --now

Before you continue any further, it is recommended to reboot your PC to make sure all paths for Snap have been generated. Failure to do this may result in errors using Snap. If you encounter these, make sure to go back and follow this step.

sudo reboot

Next, some packages come in classic, so you need to create a symlink to enable classic snap support.

sudo ln -s /var/lib/snapd/snap /snap

Next, verify the Snapd service is running by using the systemctl command:

systemctl status snapd

Example:

How to Install PyCharm IDE on Linux Mint 20

If you are installing Snap for the first time, it is advised to install the core files to avoid conflicting issues:


sudo snap install core

Example output:

core 16-2.52.1 from Canonical✓ installed

Next, install the PyCharm.

Install PyCharm Community:

sudo snap install pycharm-community --classic

Install PyCharm Professional:

sudo snap install pycharm-professional --classic

Install PyCharm Educational:

sudo snap install pycharm-educational --classic

Example output (Community):


pycharm-community 2021.3.1 from jetbrains✓ installed

As above, this informs you that PyCharm was successfully installed and the version number.

For the future, to update along with and any other packages installed by Snap, run the following command:

sudo snap refresh

If you no longer need PyCharm installed, remove it using the Snap remove command.

Remove PyCharm Community:

sudo snap remove pycharm-community

Remove PyCharm Professional:

sudo snap remove pycharm-professional

Remove PyCharm Educational:


sudo snap remove pycharm-educational

Example output (Community):

pycharm-community removed

Option 2 – Install PyCharm with Flatpak

The second option is to use the Flatpak package manager. Flatpak should be present on your Linux Mint system by default.

First, if you have removed Flatpak or are unsure if you have, run the install command as follows.

sudo apt install flatpak -y

Next, you need to enable Flatpack using the following command in your terminal:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Flatpak only features Community and Professional and not the Educational. For most, the Community is recommended for first-time use.

Install PyCharm Community:


flatpak install flathub com.jetbrains.PyCharm-Community

Install PyCharm Professional:

flatpak install flathub com.jetbrains.PyCharm-Professional

Example output (Community):

How to Install PyCharm IDE on Linux Mint 20

Type Y twice, then press the ENTER KEY twice to install.

However, if you need to update manually, use the following command.

flatpak update

To remove the Flatpack version of PyCharm, use the following command.

Remove PyCharm Community:


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

Remove PyCharm Professional:

flatpak uninstall --delete-data com.jetbrains.PyCharm-Professional

Example output (Community):

How to Install PyCharm IDE on Linux Mint 20

Type Y and then ENTER KEY to proceed with the removal of PyCharm using the Flatpak method.

How to Launch PyCharm

Now that you have the PyCharm client installed, launching can be done in a few ways. While you are in your terminal, use the following commands to launch your version of PyCharm.

Launch PyCharm Community:

pycharm-community

Launch PyCharm Professional:


pycharm-professional

Launch PyCharm Educational:

pycharm-educational

Alternatively, Flatpak users will need to launch using the command below from a terminal instance:

Launch PyCharm Community:

flatpak run com.jetbrains.PyCharm-Professional
flatpak run com.jetbrains.PyCharm-Community

Launch PyCharm Professional:

flatpak run com.jetbrains.PyCharm-Professional

However, this isn’t practical, and you would use the following path on your desktop to open with the path: Taskbar > Programming > PyCharm.

Alternatively, if you cannot find it, use the search function in the Show Applications menu if you have many applications installed.


Example:

Note, PyCharm Educational is only available to install from Snapcraft.

The first time you launch PyCharm, you will potentially come across two pop-ups.

The first pop-up is the standard terms of use.

Press the accept button to continue.

Example:


How to Install PyCharm IDE on Linux Mint 20

The second pop-up is requesting if you would like to share anonymous data to help improve the application.

Choose either to send or not to send to continue.

Example:

How to Install PyCharm IDE on Linux Mint 20

Once you open PyCharm, you will see the first default landing screen.

Example (Community):

How to Install PyCharm IDE on Linux Mint 20

Congratulations, you have successfully installed and launched PyCharm.


Comments and Conclusion

In the tutorial, you have learned how to install PyCharm on your Linux Mint desktop using two different methods, which you can change in the future if you prefer using one package manager over another.

Overall, it is worth installing PyCharm if you heavily develop Python programming language. If you are learning Python, you do not need to be an expert, and it will help you understand just as well, if not better, than any of the more prominent names in the IDE field.

For further information, visit the official PyCharm documentation.


Not what you were looking for? Try searching for additional tutorials.

Leave a Comment