JetBrains announced the 2022.1 release of its PyCharm IDE few days ago. Here’s how to install in Ubuntu in different ways.
What’s New in PyCharm 2022.1
This is the first release of the IDE in 2022. Release highlights include (see release note for details):
- Basic http authentication support for custom package repositories
- Enhanced code completion for TypedDict
- Improved TypedDict per-key warnings
- Run commands directly from Markdown files
- New Copy code snippet for Markdown.
- Code cells remain in Edit mode after execution (Pro)
- Optimized cell copy-pasting (Pro)
- MongoDB: Editing fields in results (Pro)
- New Services UI for Docker (Pro)
How to Install PyCharm 2022.1 in Ubuntu Linux
Method 1: Snap package
JetBrains provides official package for Ubuntu users through the Snap which runs in sandbox. Ubuntu user may just search for and install it from Ubuntu Software:
For choice, you may also press Ctrl+Alt+T on keyboard and run commands below to install it:
sudo snap install pycharm-community --classic
And you may replace pycharm-community
with pycharm-professional
in command for pro edition.
Method 2: Flatpak package
The IDE is also available to install as Flatpak, another universal package runs in sandbox.
1. First press Ctrl+Alt+T on keyboard and run command to install Flatpak daemon:
sudo apt install flatpak
2. Next, install the Python IDE as Flatpak using command:
flatpak install https://dl.flathub.org/repo/appstream/com.jetbrains.PyCharm-Community.flatpakref
For the Professional edition, use command:
flatpak install https://dl.flathub.org/repo/appstream/com.jetbrains.PyCharm-Professional.flatpakref
Method 3: Linux Tarball
For those don’t like the Snap and/or Flatpak, there’s no official .deb
package available though you may keep an eye on this unofficial PPA.
There’s however Linux tarball available to download in its website:
After downloaded the package, extract and run the “pycharm.sh” file under ‘bin’ sub-folder will launch the IDE.
Create app shortcut so to launch PyCharm IDE from start menu
The Linux tarball lacks app shortcut integration. Here’s how to create one manually.
1.) For current user only, I’d recommend to move the source folder into “.local/bin” folder.
Open ‘Files’, press Ctrl+H, and then navigate to “.local -> bin (create if not exist)”. Then, move the source folder from Downloads to that directory.
2.) Press Ctrl+Alt+T on keyboard to open terminal, and verify by running command:
~/.local/bin/pycharm-*/bin/pycharm.sh
If the IDE launches, you can now create app shortcuts via the next step.
3.) In terminal (Ctrl+Alt+T), run command to create a shortcut file and edit via Gedit text editor:
gedit ~/.local/share/applications/pycharm-community.desktop
When the file opens, add following lines:
[Desktop Entry]
Name=PyCharm Community
Exec=/home/ji/.local/bin/pycharm-community-2022.1/bin/pycharm.sh
Icon=/home/ji/.local/bin/pycharm-community-2022.1/bin/pycharm.png
Terminal=false
Type=Application
Categories=Application;Development;
Keywords=ide;python;charm;
StartupWMClass=jetbrains-pycharm-ce
NOTE: you need to change the value of “Exec” and “Icon” by replacing ji with your username, and community with professional for Pro edition.
Tip: you may just Press Ctrl+L in file manager to copy the PATH to current folder quickly. And then paste in the previous text editor.
NOTE: If you write wrong value for ‘Exec’, the app won’t appear in system start menu (Show Applications) search results.
Remove PyCharm:
To remove the IDE, run the command below accordingly. Replace community
to professional
, or Community
to Professional
for Pro edition.
Remove the Snap package via command:
sudo snap remove pycharm-community
To remove the Flatpak package:
flatpak uninstall --delete-data com.jetbrains.PyCharm-Community
And, remove the tarball package via command:
rm -R ~/.local/bin/pycharm-* ~/.local/share/applications/pycharm-*.desktop