How to Install and Use Python PyCharm on Linux

PyCharm is a popular cross-platform IDE for Python developed by JetBrains for scripting. With Python PyCharm, the user experience is consistent whether you install it on Windows, Mac OS, or Linux.

It provides useful features like intelligent code editing, code profiling, support for frameworks such as Django and Flask. PyCharm also has package management, debugging, refactoring, and other tools for development productivity.

Python PyCharm: The Basics

Apart from PyCharm’s feature-rich environment, it has become one of the most popular IDE among developers because of its integration with major version control systems and virtual machines like Vagrant and Docker. It even has its built-in Terminal.

There are three editions available for PyCharm: Professional, Community, and Edu. The Professional edition provides more features compared to the Community and Edu editions. The Community and Edu editions are open-source and free of cost, and with the Edu edition, you get courses that would help you learn programming with Python.

Python is a high-level, general-purpose programming language that lets you integrate systems efficiently using fewer lines of code. It comes pre-installed on most Linux distributions. If your distro does not come with it, you will have to install it separately from PyCharm. We will also include the details regarding installation of Python in this article.

As we have mentioned earlier, there are three editions for PyCharm. And in our example, we’ll be installing the Community Edition, which has been designed purely for Python Development.

Prerequisite

To install PyCharm on Linux, you will need a Linux OS system. The OS has to be either GNOME or KDE desktop. Also, you will need a browser that will let you download software from the Jetbrains official website. 

For the extraction process, you may need a command-line utility like tar or if available, use your file explorer’s default extraction capabilities.

Lastly, you will need a sudo privileged user account and some basic knowledge in software installation on Linux. Below are the details regarding the system requirements.

System requirements:

  • Linux with GNOME or KDE desktop distro
  • Minimum of 2 GB free RAM and 8 GB total system RAM is recommended.
  • 2.5 GB of hard disk space, SSD is recommended
  • 1024×768 is the minimum screen resolution
  • Python version 2.7, or 3.5 and above

Note that the PyCharm distribution comes with the JetBrains Runtime (JBR) 11, and with that, there is no need to install Java to run PyCharm.

How to Install and Use Python PyCharm on Linux

Download the PyCharm Community Package

To download the PyCharm Software package, open a browser and go to the official website for Jetbrains. You can download the package here. This is where you can download the Professional and Community editions.

download pycharm

Just click on the download button for the Community edition, and it should download automatically. We recommend using Google Chrome for ease of use. Once the download completes, your file will be located in the Downloads folder.

You may be wondering why you can only see two editions when we said there are three. The Edu edition is actually located on a separate page, and you can access it here if you prefer to download that version.

pycharm edu

Extract PyCharm IDE Package

Now that you have downloaded the package, you need to extract it to a folder. Remember where this folder is located; this is where you will be executing the installation from.

There are several ways to extract the package. You may use a GUI-based utility like Ark, a command line utility like tar, or the extract capability from the default file explorer that came with your distro.

Extract PyCharm Package from Terminal

Syntax:

$ tar [OPTIONS] [FILENAME]

Example:

$ tar -xvf pycharm-community-2022.1.3.tar.gz
terminal

Running the tar command will extract your package to the same directory right away. It will also automatically create a new folder for the extracted files as well.

Extract PyCharm Package from File Explorer

To extract from the GUI (Graphical User Interface), you can use the default file explorer of your distro. 

install and use python pycharm on linux

First, locate the package we have downloaded, then right-click on it. You will then get an option to extract to the same folder, or you may choose to extract to a different folder. You may also use a utility like Ark to extract the package.

dolphin

Here you can see the extracted package named “pycharm-community-2022.1.3”. The extraction process automatically created this folder. Since we selected the ‘Extract Archive Here’ option in this example, the folder was created in the same location in the Downloads directory.

install and use python pycharm on linux

This is what it looks like if you use a utility like Ark for extraction. It will show you all the files in the package even if you haven’t extracted them yet.

install and use python pycharm on linux

If you open the extracted folder, you will see pretty much the same files as what the Ark utility shows you.

Run the PyCharm Installation Script

For the installation, the file we are interested in is in the bin folder, and the file name is pycharm.sh. We need to run this file from the Terminal to initiate the installation.

Installation script

Here you can see all the files in the bin folder with the installation script file highlighted.

community terms

The sample screenshot above is what you will get by dragging and dropping the pycharm.sh file to a Terminal and then hit enter to run the installation script.

If in case you cannot drag-drop the file, you may type in the needed command manually. To do it, you first need to go to the bin directory and then run the file by typing in ./pycharm.sh.

The PyCharm User Agreement screen should pop up immediately after running the installation script. Check on the acceptance confirmation tick box, then hit continue.

User agreement

You will then be asked for consent regarding data sharing. It’s up to you if you would like to send anonymous statistics to Jetbrains.

pycharm

The logo screen above should come up next after choosing to send or not send anonymous statistics.

install and use python pycharm on linux

Then finally, you get the welcome screen for PyCharm.

install and use python pycharm on linux

Here are the details that you see behind the PyCharm welcome screen. This should have completed the installation for PyCharm IDE. Unfortunately, this method to install Python PyCharm does not automatically create a shortcut on Linux applications folder or desktop.

Create Shortcut for PyCharm

install and use python pycharm on linux

As you can see in the screenshot above, you can quickly create an Entry on your desktop by clicking on the gear icon.

pycharm community edition

You should now be able to see PyCharm in your recently installed applications menu. From here, you may choose to add the shortcut to your Favorites menu or Desktop.

Create New Python Project

welcome script

From the welcome screen, after clicking on ‘+’ icon to create a new project, the screenshot above is what you will get. And if in case you get the same message, “Interpreter field is empty” this most likely means that you do not have Python version 3 installed on your system.

Install Python 3 on Linux

To verify whether you have the Python 3 or 2 version, you may use the commands below.

Syntax:

$ python --version
$ python3 --version

To install Python version 3, you can use the command shown below, however, this is not the only way to do it. That method is only applicable if you have the yum utility installed on your system. Well, you can install yum to any Linux distro, so there shouldn’t be any problem.

Syntax:

$ sudo yum install python3
install and use python pycharm on linux

You can see in this screenshot that we first checked what Python version we have, and it shows you that Python version 3 is not found. After the installation was completed, we checked again and have confirmed that Python 3 has installed successfully.

You will need to reboot the system before PyCharm could recognize the version 3 Python that we’ve just installed.

new project

After rebooting, you should now be able to create a new project. Just type in a name for your project, then click on create.

install and use python pycharm on linux

After hitting create, PyCharm will start loading and creating your virtual environment.

install and use python pycharm on linux

Once you get to this screen, you should be able to start writing your code.

And that marks the end of this tutorial. Now you know how to install Python PyCharm on Linux. We also showed you how to create shortcuts for PyCharm and create a new project. And lastly, we also learned how to install version 3 for Python.

If this guide helped you, please share it. ?

Leave a Reply
Related Posts