Developed by JetBrains, the same company behind IntelliJ IDEA, Pycharm is one of the most widely used IDE ( Integrated Development Environment) for developing Python applications. It’s a feature-rich IDE that comes packed with all the features you need for writing and debugging your Python code. It creates a virtual environment that you can use to run code.
Pycharm is available in 3 editions: Community, Education, and Professional. The Community Edition is absolutely free and opensource and constantly maintained by developers. The Education Edition provides a much simpler UI and is based on Community Edition. The professional Edition is a paid Edition and provides extensive functionalities such as support for more languages, and additional tools for web and database development.
In this guide, we will focus on the installation of Pycharm on Debian 11.
Option 1: Install Pycharm using snap
One of the easiest ways of installing Pycharm is using Snap. Snap is a software packaging and deployment tool developed by Canonical – the parent Company of Ubuntu.
A snap is a containerized application that bundles the application code alongside its dependencies, libraries, source code, and configuration files. Snaps are distribution agnostic and work across multiple various distributions. The main advantage of using snaps is that dependencies are well-taken care of, As such, you won’t have to worry about running into dependency errors during the installation of an application. Snaps are hosted in Snapcraft which is a snap store that contains thousands of snap packages.
To get underway, we need to install and enable Snapd daemon before anything else. This is a service that allows you to manage snaps on your system. Then later, we will use snap to install the Pycharm application.
First, update the package lists
$ sudo apt update
Then install snapd as follows:
$ sudo apt install snapd
Once installed, Enable the snapd daemon.
$ sudo systemctl enable snapd —-now
It’s advisable to enable classic snap support which might be needed by packages that might need to be unconfined from the snap bundled application and acquire full system access just like other traditional packages. To enable classic snap support, run the command:
$ sudo ln -s /var/lib/snapd/ /snap
Additionally, install core files.
$ sudo snap install core
Next, restart snapd daemon.
$ sudo systemctl restart snapd
Then verify its status as follows.
$ sudo systemctl status snapd
From the output, you can see that snapd is active and running.
The next step is to install Pycharm from Snap. There are three editions of Pycharm: Community, Educational and Professional.
For this guide, we will install the Community Edition which is free and opensources. Therefore, run:
$ sudo snap install pycharm-community --classic
Once the installation is complete you will get the following output.
For the Education edition, run the command:
$ sudo snap install pycharm-professional --classic
For the Professional edition, execute the command:
$ sudo snap install pycharm-educational --classic
At this point, Pycharm is successfully installed. However, the Pycharm icon will not be available until the next reboot. Therefore, reboot your system.
$ sudo reboot
While snaps are a convenient way of installing software applications, they take up considerable amounts of disk space compared to installing software packages from official repositories using traditional package managers such as APT and DNF. However, the trade-off is regular updates and constantly maintained packages.
You can update all snap packages in the future using the simple command:
$ sudo snap refresh
Option 2: Install Pycharm from Flatpak
The second option is installing Pycharm from Flatpak. This is yet another universal package management utility that allows you to install and manage software packages without having to worry about dependencies. Like snap, it is distribution agnostic and lets you install software packages without having to worry about your Linux distribution. Flatpak applications run in isolation in an environment known as a sandbox that contains all that is required to run the specific application.
To use Flatpak, you must , first of all , install and enable Flatpak on your system. Therefore, we will begin by installing Flatpak as follows:
$ sudo apt install flatpak
Once installed, proceed and enable the Flatpak repository from Flathub which is a Flatpak App Store for Flatpak applications.
Flatpak only provides Community and Educational Editions. But as always, the Community edition is always recommended especially for beginners.
To install the Community Edition execute the command:
$ sudo flatpak install flathub com.jetbrains.PyCharm-Community
For Professional Edition run the following command:
$ sudo flatpak install flathub com.jetbrains.PyCharm-Professional
Here is some sample output. BE sure to press ‘Y’ for all the prompts.
To launch Pycharm, click on ‘Activities’ at the top left corner of your desktop and search for ‘Pycharm’. Click on the icon to launch Pycharm.
After a few seconds, you will get a pop-up GUI as shown. Accept the User Agreement Terms and click ‘Continue’ to proceed with the installation.
Next, make a choice whether or not you want to anonymously share your application’s data about features, plugins performance, etc with Pycharm developers.
And finally, you will get the default Pycharm window. Click on ‘Start Tour’ to acquaint yourself with the various Pycharm features that you will soon start interacting with..
Bravo! You have successfully installed Pycharm on Debian 11 BullsEye.