PyCharm is an integrated development environment (IDE) developed by JetBrains for Python development. It offers smart code assistance, debugging, and support for web frameworks, making it a top choice for Python developers. This tutorial shows how to install PyCharm on Ubuntu 24.04.
Install PyCharm
First, retrieve the most recent release version of PyCharm using JetBrains API:
PYCHARM_VERSION=$(curl -s "https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=release" | grep -Po '"version":"\K[0-9.]+')
Next, download the corresponding PyCharm archive for the latest version:
wget -O pycharm.tar.gz download.jetbrains.com/python/pycharm-professional-$PYCHARM_VERSION.tar.gz
Create a directory for the PyCharm and unpack the archive contents into it:
sudo mkdir -p /opt/pycharm
sudo tar xf pycharm.tar.gz --strip-components=1 -C /opt/pycharm
Once extraction is complete, remove the unneeded archive:
rm -rf pycharm.tar.gz
Testing PyCharm
To launch the PyCharm and confirm it's working properly, use the following command:
/opt/pycharm/bin/pycharm
Once it opens, you can use the welcome screen to create a desktop shortcut. This makes PyCharm accessible from the app launcher, so you don't need to rely on the terminal.
Uninstall PyCharm
Delete the PyCharm installation directory:
sudo rm -rf /opt/pycharm
If you created a launcher shortcut, remove that too:
sudo rm -rf /usr/share/applications/jetbrains-pycharm.desktop
Clear out configuration files, local settings, and cached data:
rm -rf ~/.{cache,config,local/share}/JetBrains/PyCharm*
Leave a Comment
Cancel reply