Python in Eclipse 2021-03
In the software development world, almost everyone is familiar with Eclipse and at some point in our development careers; we do leverage this software to build applications. This open source software, also known as an “Integrated Development Environment” (IDE); was primarily developed to ease Java development. Gradually, it supported other languages like C++, Groovy, Ada, etc. In fact, it also supports development of Python applications/scripts. While there are various tools available to code Python, I wanted to research on how easily can one develop Python code in an Eclipse environment. In fact the the key question was – is the vanilla Eclipse sufficient to develop and test Python scripts?? While the answer is NO but surprisingly it is very easy to enable Eclipse with the Python plugin. Three simple steps are sufficient to address this task – Download, Install and Configure!! Let us take a look at the same…
Steps to install Python / PyDev in Eclipse 2021 R version
Pre-requisites: Python should be installed and configured in the System PATH (environment variables)
Step 1: DOWNLOAD the latest Eclipse version “2021-03 R” from https://www.eclipse.org/downloads/packages/ for the respective operating system, I had selected for Windows- 64 bit.
Step 2: Start the INSTALLATION for Eclipse by clicking the downloaded software/exe (ensure to have permissions to run this installation). The installer will prompt for the type of IDE to be installed. Select the option “Eclipse IDE for Eclipse Committers” as shown below-
Step 3: Post successful installation, we need to CONFIGURE the tool. Open Eclipse (do create a workspace to save your project work).
Once the IDE is open, we need to download and configure “PyDev” properties in this Eclipse edition. Click on the Help menu option and select the option “Install New Software…” as shown below-
Type in the location as “http://pydev.org/updates” to look out for the updates. Check for the name “PyDev”, select this option as shown below and install this update.
With the above step, Eclipse is enabled with the PyDev plugin. Now, we need to connect this Python environment with the Python installation that we have in our system. I had installed Python 3.7 on my machine (which is in the system path as well) and will set the path in Eclipse too. Click on the Windows menu and select “Preferences” option as shown below-
From the left panel, click on the PyDev option, look for the sub-menu called “Interpreters” and select “Python Interpreter” as shown below. On the right side of this window, check for the list of interpreters that Eclipse has identified. If not, then browse for the same and set the path here.
Apply these new changes and close this window. You are now good to start Python development in this Eclipse version 2021-03. You can now change the Eclipse perspective to Python and start by creating a new Project in Python –
Isn’t this easy? I found it to be very simple!! Are there any other variants which work in similar way/s ??