Table of Contents
  • Home
  • /
  • Blog
  • /
  • 3 Ways to Install PyCharm on Linux Mint and Ubuntu!
January 12, 2024
|
8m

3 Ways to Install PyCharm on Linux Mint and Ubuntu!


3 Ways To Install Pycharm On Linux Mint And Ubuntu

It’s considered strange if somebody says they never heard of Python. Still, if you want to know about Python, Python is a general-purpose, versatile, powerful, high-level programming language. Python can be used in both scripting and programming. It’s the most versatile language as it can be used in various landscapes, from small scripts to large complex application developments. It’s the favorite programming and scripting language for cybersecurity professionals either. In the field of AIML, no other languages dominate Python. Python is a different topic of discussion. Let’s leave the Python at this point. Let’s concentrate more on running Python on an IDE like PyCharm on Linux operating system. Before you run a python code on IDE, you will have to install and configure it on your Linux, isn’t it?. Let’s see how to install PyCharm on Linux Mint and Ubuntu and how to create your own project on PyCharm and run a python program.

What Is An IDE?

Before we jump right into the PyCharm, let’s see what is an IDE is. IDE is short for an Integrated Development Environment. IDT is basically a software environment used to build applications that combine common developer tools into a single interface. IDE is typically composed of several components:

  1. Intellegent source code editor: It is an advanced text editor, which helps programmers in writing codes with features such as auto-syntax highlighter and auto-completion. These features help programmers identifying the different objects in the program with different coloring systems. 

  2. Local build automation: This component helps programmers in automating simple, repeatable tasks like compiling source code into binary code, packaging binary code, and running automated tests, creating a local build of the software.

  3. Debugger: Debugger allows to comple the entire program in debug mode and stop/pause the executio whereever the programmer wnats. It helps programmers in finding the location of bugs in the source code.

What Is PyCharm?

PyCharm is one of the most popular IDE for Python. PyCharm is developed by JetBrains (formerly known as IntelliJ), a Czech software company known for making software development tools. PyCharm is a cross-platform IDE tool that works on Windows, Linux, and mac. This tool comes in both community and professional editions. The community edition is made free to use under Apache License. However, the professional edition is its paid version which comes with some additional features.

Benefits of Using PyCharm:

It is not mandatory to have PyCharm write and run Python programs. But, the features PyCharm provides made programmers’ life a lot easier. Pycharm offers a long set of features such as Intelligent Coding Assistance, a collection of built-in developer tools, graphical debugger, Python profiler, support for SQL, Django, and Anaconda.

Its Intelligent Coding Assistance capabilities allow programmers to do code inspection, code completion and identify and fix the errors on the fly. Its smart code editor is smart enough to support Python, JavaScript, CoffeeScript, TypeScript, CSS, and other popular languages syntax.

Pycharm is loaded with a wide set of development tools. In its collection of tools, it has a powerful graphical debugger that helps find the exact location of bugs. It supports most of the popular databases, including Access Oracle, SQL Server, PostgreSQL, MySQL, and others. It’s a great tool for web developers as it supports modern web development frameworks such as Django, Flask, Google App Engine, Pyramid, and web2py.

The professional version of PyCharm can save programmers time by integrating well-known VCS tools like Git, SVN, Mercurial, or other version control systems. The Pro version also comes with a feature that allows programmers to run and debug your application on remote machines.

This is not just the end. PyCharm has tons of beneficial features for programmers. Please check out the comprehensive list of features on their website.

How to Install PyCharm on Linux Mint and Ubuntu in Three Different Ways?

PyCharm is easy to install application. You can download the community edition of PyCharm and use it for free. Visit this page if you want to download PyCharm for Windows operating system. However, the purpose of writing this post is to show you how to install PyCharm on Linux Mint and Ubuntu. You can install PyCharm in different ways on Linux systems. Let’s see three ways to install PyCharm on Linux Mint and Ubuntu OS.

  1. Install PyCharm from Snap Store

  2. Install PyCharm from Software Manager

  3. Install PyCharm from an Installer File

#1. Install PyCharm From Snap Store

You can use snap packages to install PyCharm from your terminal window. Snaps are application packages packed the application with all the dependencies required to install and run the application.

  1. Enable the snap on Linux Mint.

  • Press Ctrl+Alt+t to open the terminal.

  • Remove ‘nosnap.pref‘ from the location /etc/apt/preferences.d/nosnap.pref:

  • Update the repository.

$ sudo rm /etc/apt/preferences.d/nosnap.pref
$ sudo apt update

2. Install snapd from the command line. Note: you can also install snapd from the Sodtware Manager either. Search ‘snapd’ in the Software Manager.

$ sudo apt install snapd

3. PyCharm is distributed in three editions: Professional Edition, Community Edition, and Edu Edition. Run these commands to install the PyCharm. We are going to install the community edition in this demonstration.

$ sudo snap install pycharm-professional --classic
$ sudo snap install pycharm-community --classic
$ sudo snap install pycharm-educational --classic

4. Use these commands to run Pycharm from the terminal.

$ pycharm-professional
$ pycharm-community
$ pycharm-educational

Read and accept the terms and data sharing policy.

#2. Install PyCharm From Software Manager

It is possible to install PyCharm directly from the Software Manager. It’s is the easiest way to install. All you need to open the Software Manager and search ‘pycharm’ in the search box. Only two editions: professional and community editions are available on the Software Manager. Select the one which you want. We are installing the community edition like previous.

  1. Open the Software Manager and type ‘pycharm’ in the search box.

2. Select the one which you want. We are installing the community edition as we did before. Click on the install button in the top right corner. Let the installation process complete. The installation process may take a few minutes depending on your system performance and internet bandwidth.

3. Launch PyCharm after the completion of the installation.

Read and accept the terms and data sharing policy to start PyCharm.

#3. Install PyCharm From an Installer File

  1. Download the installer from here. You can try downloading using the wget command either.

$ wget https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=linux&code=PCC

2. Downloaded file would be in the ‘Downloads‘ directory. It is recommended to install the package under /opt/ directory. Unpack the tar file using this command.

$ cd Downloads/
$ sudo tar xzf pycharm-*.tar.gz -C /opt/

3. Namivage to the ‘bin‘ inside the PyCharm. Run ‘python.sh‘ file to launch PyCharm.

$ cd /opt/pycharm-community-2021.2.1/bin/
$ sh pycharm.sh

4. Read and accept the terms and data sharing policy to launch the PyCharm on Linux Mint.

How to Configure PyCharm to Run Python Programs?

This is the first window PyCharm greats you with. Start by creating a new project out here. After you click on the New Project. This is the configuration window you will land on. Configurations are self-explanatory. There are three main things you should always decide. That is the location of your new project, environment, and Interpreter.

Create your first python file from File > New > Python File. Name the file of your choice. Hit the ‘Enter‘ key. We have created ‘firstPythonProgram.py’ file.

How to Configure Python Interpreter on Pytharm?

You should have an interpreter configured to run the program. However, most of you will not see the interpreter for the first time. Configure the interpreter from File > Settings >Project (The project you created) > Python Interpreter.

Click the settings icon select ‘Add

Configure the interpreters for Virtual Environment and System Interpreter from the dropdown. If you use Anaconda, you can configure the interpreter for Conda either. It is all set to run the python program.

How to Add/Install Python Packages In PyCharm?

You might face problems running your program due to the required packages are not installed. It is quite easy to install the packages on PyCharm.

To add or install packages on PyCharm: File > Settings > Project (The project you created) > Python Interpreter > Add ‘+’ icon.

Search the package you want to install. Select the package and click on ‘Install‘.

You will see a successful message after the installation of the package.

This completes the basic configuration of PyCharm to run the python program.

We covered the installation of PyCharm only on Linux Mint. The installation process is pretty much the same in Ubuntu. You can use the same tutorial to install Pychamr on Ubuntu either.

Thanks for reading the tutorial. Please let us know if you have any difficulties in completing the process.

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Cloud & OS Platforms

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.

Tools

Featured

View All

Learn Something New with Free Email subscription

Subscribe

Subscribe