How to Install PyCharm on Ubuntu 24.04

This article provides a thorough guide on installing PyCharm, an IDE for Python, on Ubuntu 24.04 using various methods: APT, Snap, and Flatpak. It outlines necessary preparations, including package installation and repository addition, and explains how to launch and uninstall different PyCharm editions.

This article explains how to install PyCharm on Ubuntu 24.04.

PyCharm is an integrated development environment (IDE) designed for Python programming. Developed by JetBrains, it provides various features that enhance coding efficiency and productivity, making it a popular choice among Python developers.

PyCharm’s support for integration with various version control systems like Git and intelligent code completion allows developers to write code faster and with fewer errors.

Installing PyCharm on Ubuntu is a straightforward process. You can download the installation package from the JetBrains website, follow the simple instructions, or use APT, Snap, and Flatpak package managers.

Prepare Ubuntu

Before installing PyCharm, you may have to install some required packages and prepare Ubuntu.

Run the command below to update Ubuntu.

sudo apt update
sudo apt upgrade

Install these packages next.

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl lsb-release

Add JetBrains PPA repository

After preparing the Ubuntu machine, run the command below to add the official JetBrains PPA repository so you can install PyCharm.

First, import the repository GPG key by running the command below.

curl -s https://s3.eu-central-1.amazonaws.com/jetbrains-ppa/0xA6E8698A.pub.asc | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null

Then, add the repository by running the command below.

echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] http://jetbrains-ppa.s3-website.eu-central-1.amazonaws.com any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null

Finally, update and install the PyCharm edition for your projects. The community edition is free and has limited features.

Education and Professional editions have more features.

sudo apt update

sudo apt install pycharm-community

sudo apt install pycharm-education

sudo apt install pycharm-professional

Once installed, you can start the different PyCharm editions by running the command below.

pycharm-community

pycharm-professional

pycharm-education

You can also launch it by going to Activities > Show Applications > PyCharm on the desktop.

If you want to uninstall the PyCharm edition you installed, use the command below.

sudo apt remove pycharm-community
sudo apt remove pycharm-professional
sudo apt remove pycharm-education

Install PyCharm via Snap

Another way to install PyCharm is to use the Snap package manager.

To do that, install the Snap package manager if it’s not already installed.

sudo apt install snapd

Next, install core Snap and enable classic support by running the command below.

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

Then, run the command below to PyCharm edition for your projects from the Snap package manager.

The community edition is free and has limited features. Education and Professional editions have more features.

sudo snap install pycharm-community --classic

sudo snap install pycharm-professional --classic

sudo snap install pycharm-educational --classic

Once installed, use the Dock on the left sidebar to search and launch the PyCharm app.

You can also run the app using the command below.

snap run pycharm-community

snap run pycharm-professional

snap run pycharm-educational

Remove the app using the command below.

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

Install PyCharm via Flatpak

Yet another way to install PyCharm is to use the Flatpak package manager. Flatpak uses a sandboxing package installation, enhancing security and allowing easy updates.

Flatpak is a third-party application distribution system that is not included in Ubuntu by default.

You must install the Flatpak package manager and then install PyCharm from there.

First, update and install Flatpak.

sudo apt update && sudo apt upgrade
sudo apt install flatpak

Next, add the Flatpak repository to Ubuntu.

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

Finally, install PyCharm. The education edition is not available on Flatpak.

flatpak install flathub com.jetbrains.PyCharm-Community

flatpak install flathub com.jetbrains.PyCharm-Professional

Once installed, you can launch it using the command below or open the app in the desktop apps center.

flatpak run com.jetbrains.PyCharm-Community

flatpak run com.jetbrains.PyCharm-Professional

Uninstall the app using the command below.

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

That should do it!

Conclusion

Installing PyCharm on Ubuntu 24.04 can be accomplished in several straightforward ways. Here are the key takeaways:

  • Multiple Installation Methods: You can install PyCharm using APT, Snap, or Flatpak, providing flexibility based on your preferences.
  • Editions Available: The Community edition is free, while the Education and Professional editions offer additional features tailored to varied user needs.
  • Easy Uninstallation: Uninstalling PyCharm is as simple as executing a command, ensuring you can manage your software easily.
  • Enhanced Development Experience: PyCharm enhances productivity with features like intelligent code completion and version control integration.
  • User-Friendly Interface: The IDE provides a familiar environment for developers to streamline their coding processes on Ubuntu.

Choosing the correct method and edition of PyCharm can significantly enhance your Python programming workflow on Ubuntu.

Comments

Leave a Reply

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