- Pycharm для linux mint
- What Is An IDE?
- What Is PyCharm?
- Benefits of Using PyCharm:
- How to Install PyCharm on Linux Mint and Ubuntu in Three Different Ways?
- #1. Install PyCharm From Snap Store
- #2. Install PyCharm From Software Manager
- #3. Install PyCharm From an Installer File
- How to Configure PyCharm to Run Python Programs?
- How to Configure Python Interpreter on Pytharm?
- How to Add/Install Python Packages In PyCharm?
- Keep Reading:
- Arun KL
Pycharm для linux mint
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:
- 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.
- 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.
- 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.
- Install PyCharm from Snap Store
- Install PyCharm from Software Manager
- 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.
- 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.
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.
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
$ 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.
Keep Reading:
Arun KL
Hi All, I am Arun KL, an IT Security Professional. Founder of “thesecmaster.com”. Enthusiast, Security Blogger, Technical Writer, Editor, Author at TheSecMaster. To know more about me. Follow me on LinkedIn
1) English 2) Español 1) A single correction, for the new version. To install do not put: $ sh python.sh instead use: $ sh pycharm.sh This can make the inexperienced users crazy. To know what to write, in the console put: ls -l and the name that appeared with .sh is the one you have to use. For example in my console it appears: -rw-r–r– 1 root root 119795 sep 15 05:48 brokenPlugins.db
-rwxr-xr-x 1 root root 220 sep 15 05:48 format.sh
-rwxr-xr-x 1 root root 24208 sep 15 05:48 fsnotifier
drwxr-xr-x 2 root root 4096 sep 15 05:48 icons
-rw-r–r– 1 root root 11264 sep 15 05:48 idea.properties
-rwxr-xr-x 1 root root 295 sep 15 05:48 inspect.sh
-rw-r–r– 1 root root 297424 sep 15 05:48 libdbm.so
-rwxr-xr-x 1 root root 828 sep 15 05:48 ltedit.sh
-rw-r–r– 1 root root 562 sep 15 05:48 pycharm64.vmoptions
-rw-r–r– 1 root root 7074 sep 15 05:48 pycharm.png
-rwxr-xr-x 1 root root 9846 sep 15 05:48 pycharm.sh
-rw-r–r– 1 root root 9808 sep 15 05:48 pycharm.svg
-rwxr-xr-x 1 root root 9596150 sep 15 05:48 repair
-rwxr-xr-x 1 root root 808 sep 15 05:48 restart.py 2) Una sola corrección, para la nueva versión. Para instalar no hay que poner: $ sh python.sh sino: $ sh pycharm.sh Esto puede volver loco a los que no tienen experiencia. Para saber qué escribir, en la consola poner: ls -l y el nombre que les apareció con .sh es el que tienen que usar. Ejemplo de lo que aparece en mi consola: -rw-r–r– 1 root root 119795 sep 15 05:48 brokenPlugins.db
-rwxr-xr-x 1 root root 220 sep 15 05:48 format.sh
-rwxr-xr-x 1 root root 24208 sep 15 05:48 fsnotifier
drwxr-xr-x 2 root root 4096 sep 15 05:48 icons
-rw-r–r– 1 root root 11264 sep 15 05:48 idea.properties
-rwxr-xr-x 1 root root 295 sep 15 05:48 inspect.sh
-rw-r–r– 1 root root 297424 sep 15 05:48 libdbm.so
-rwxr-xr-x 1 root root 828 sep 15 05:48 ltedit.sh
-rw-r–r– 1 root root 562 sep 15 05:48 pycharm64.vmoptions
-rw-r–r– 1 root root 7074 sep 15 05:48 pycharm.png
-rwxr-xr-x 1 root root 9846 sep 15 05:48 pycharm.sh
-rw-r–r– 1 root root 9808 sep 15 05:48 pycharm.svg
-rwxr-xr-x 1 root root 9596150 sep 15 05:48 repair
-rwxr-xr-x 1 root root 808 sep 15 05:48 restart.py
Hi Sebastián, I am glad that you identified this. I have corrected this now. Let me know if there is something else to correct.