Setting Up PyCharm on Linux ARM64 Architecture (Raspberry Pi 5)

Praiz UX
PraizUX Engineering
4 min readJul 21, 2024

I’ve been tinkering with my Raspberry Pi and decided to switch from the Raspberry Pi OS( Debian GNU/Linux) to Ubuntu server. I had to download and set up my frequently used applications. In this article, I will be sharing the steps I used in setting up PyCharm.

NB: It can be misleading if you follow the steps from the PyCharm setup page. When I followed that I had this issue where the terminal is blank on Pycharm. It is a problem on Pycharm and Intellij if you use RaspberryPi (I’ve raised tickets with Jetbrains on this and seen others raised in the community). I used this link from my JetBrains account and got the actual download file for my ARM64 architecture. It is straightforward and saves you time.
NB: There is a troubleshooting tip at the end of the article.

Download and Install PyCharm

Download PyCharm from the JetBrains page based on your computer architecture. I use ARM64.

Download PyCharm 2024.1.4

Install Using .tar.gz File

To install and run PyCharm Professional from a .tar.gz file in your Downloads folder, follow these steps:

Step 1: Extract the .tar.gz File

  1. Open a terminal.
  2. Navigate to your Downloads folder:
cd ~/Downloads

3. Extract the .tar.gz file, this will create a directory named pycharm-2024.1.4.

tar -xzf pycharm-professional-2024.1.4-aarch64.tar.gz

Step 2: Move the Extracted Files to /opt

  1. Move the extracted folder to /opt:
sudo mv pycharm-2024.1.4 /opt/

2. Navigate to the bin directory of the extracted PyCharm folder:

cd /opt/pycharm-2024.1.4/bin

Step 3: Run PyCharm

  1. To run PyCharm, use:
./pycharm.sh

With the above steps you’ve completed the installation of PyCharm on your Ubuntu system. The next steps will help create a desktop entry so you can launch the app from your desktop without using the terminal.

Create a Desktop Entry

To make PyCharm easier to launch, create a desktop entry.

Step 1: Create the Desktop Entry

  1. Open a terminal and create a new desktop entry file:
sudo nano /usr/share/applications/pycharm.desktop

2. Add the following content to the file:

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm
Icon=/opt/pycharm-2024.1.4/bin/pycharm.png
Exec="/opt/pycharm-2024.1.4/bin/pycharm.sh" %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupNotify=true

3. Save the file and exit :

  • Press Ctrl+O to save the file.
  • Press Enter to confirm.
  • Press Ctrl+X to exit nano.

Step 2: Set Permissions

  1. Make the desktop entry executable:
sudo chmod +x /usr/share/applications/pycharm.desktop

Running PyCharm from the Applications Menu

After creating the desktop entry, you should be able to find and launch PyCharm from your applications menu:

  1. Open the applications menu, you should see the pyCharm app there.
  2. You can search for “PyCharm”.
  3. Click the PyCharm icon to launch.

Uninstalling PyCharm

You may need to uninstall pycharm or a previous version, follow the steps below to uninstall he application.

Uninstall PyCharm Installed from .tar.gz File

  1. Open a terminal: Press Ctrl+Alt+T to open a terminal.

2. Remove the PyCharm directory:

sudo rm -rf /opt/pycharm-2024.1.4

Remove the Desktop Entry

If you created a desktop entry, remove it using this command:

sudo rm /usr/share/applications/pycharm.desktop

Remove Configuration and Cache Files (Optional)

  1. Remove the configuration files:
rm -rf ~/.PyCharm*
rm -rf ~/.config/JetBrains

2. Remove cache files:

rm -rf ~/.cache/JetBrains

By following these steps, you can completely uninstall PyCharm from your system if it was installed manually from a .tar.gz file.

Troubleshooting

PyCharm requires Java 17 to run successfully. You may run into an error indicating that the Java version is incorrect or not using the supported format. Follow the steps below to resolve any issues related with Java.

Step 1: Check Java Version

First step should be checking your java version. You may have the wrong version installed or nothing installed. In my case, I had previously installed Java 11, so I had to install 17.

java -version

Step 2: Install Java 17 (Optional)

If the outcome of step 1 isn’t java 17, then you need to install it using the command below:

sudo apt update
sudo apt install openjdk-17-jdk

You may have Java 17 but it is not set in the environment variable. Follow these steps to set the environment variable.

  1. Open your .bashrc file:
nano ~/.bashrc

2. Add the following lines at the end if your do not have the environment variable set:

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-arm64
export PATH=$PATH:$JAVA_HOME/bin

Save and exit the file, using the basic nano commands shared earlier (Ctrl+0, Enter, Ctrl+X).

3. Apply the changes:

source ~/.bashrc

4. Confirm JAVA_HOME:

echo $JAVA_HOME

The output should be:

/usr/lib/jvm/java-17-openjdk-arm64

Specify JDK in PyCharm Configuration

You may have everything above in place but missing the JDK in the config. Follow the steps below to specify the JDK in your PyCharm configuration.

  1. Navigate to the PyCharm bin directory:
cd /opt/pycharm-2024.1.4/bin

2. Edit the pycharm.sh script:

sudo nano pycharm.sh

3. Add the following line at the top to specify the Java home directory:

export JDK_HOME=/usr/lib/jvm/java-17-openjdk-arm64

4. Run PyCharm again:

./pycharm.sh

If you found this useful, join me on Substack to get all the latest updates and progress from my projects in network engineering, DevOps, and cloud engineering.

--

--