|4.1||Installating Python on Windows|
|4.2||Installing Python on Linux|
Programming languages have been there for ages now and every decade we see a new language that becomes widely popular. As a data scientist, the first thing you need to do is master a programming language. We can certainly say that right now python is topping the charts when it comes to its use in data science-related applications. In this article, we'll try to understand the reason behind the popularity of python among data scientists. Let's get started.
Why Python is preferred in Data Science Industry
Python has seen a tremendous rise in its use in the data science industry in the last few years. There are many reasons for it. It has a wide range of libraries that can be used for tasks such as incorporating statistical code into production databases or integrating data with web-based applications.
The biggest advantage of using python is the wide range of libraries available for data science tasks. Scikit-learn, NumPy, Scipy, Keras, TensorFlow, etc. are some popular libraries. Those who use scikit-learn will know about its various machine learning algorithms and how important they are. Plotting is another area where python excels with libraries like matplotlib, seaborn, plotly etc. These libraries are user-friendly and most of the functionalities are already taken care of by them.
Advantages of Using Python
There are many other languages like R, Scala, Julia, etc. which can be used for data science-related tasks. But python has a clear edge over all those languages. In this section we'll discuss the reasons behind python becoming so popular among data scientists:
- Simplicity - The biggest advantage of python is it's ease of use. It's simplicity has never affected it's functionality. There are multiple reasons that have made python flexible and easy to use:
- Free and open-source
- High-level programming language
- Interpreted language
- A large of community of developers
Python is also fast to write as the syntax is relatively simpler and usually, the number of lines required to write a piece of code is less when compared to other languages at the same time.
How to install Python
Installing Python on Windows
Before knowing how to use python; first, we need to install it. Due to a big update a few years back, python has now two different versions that is python 2 and python 3. In this section, we'll show ways on how to install python 3.x because most of the developers have shifted to it. But if you see some old projects you'll realize they were coded in python 2 and still need python 2 to run. This issue can be resolved by downloading python 2 and installing it side by side. Download the python installer using this link. Run the installer when it's downloaded.
Enable "Add Python 3.6 to PATH" and then click "Install Now".
Next, you have a decision to make. Clicking the "Disable path length limit" option removes the limitation on the MAX_PATH variable. This change won't break anything but will allow Python to use long path names. Since many Python programmers are working in Linux and other *nix systems where pathname length isn't an issue, turning this on in advance can help smooth over any path-related issues you might have while working in Windows.
Installing Python on Linux
Python in Linux can be installed directly from the command line. Let's see how to do it.
Type in the following command in your terminal.
sudo apt-get install python3.8
Once you are done with it you have to go through a "Y/n" question which asks you to assign some disk space for python. After you type in "Y" the remaining steps of installation will happen on their own.
To verify the installation, type in the following command.
Different Editors for Python
Python editors are tools for developers to write codes, debug any error, execute programs and perform unit tests in the code to catch bugs. It can be thought of as the workspace of a developer for working with their code and playing around with the code. There are many popular editors for python such as IDLE, Sublime Text, Atom, Pycharm, Spyder, etc.
Following are some basic requirements you should keep in mind before starting using a code editor:
- The code editor must save the work and refer to it later.
- Should support code debugging.
- Able to spot variables, keywords, and symbols using some color pattern or other method. This makes it easier to read the code.
- Allow auto-formatting of code.
Following are some editors who support all the features mentioned above:
After reading this article it is why python is becoming so popular and used more frequently in most of the areas of research and engineering. This article has provided an overview about different functionalities of python and why this programming language has an edge over others. You can read more and discover other advantages of python. Happy Learning!
Join the Course