- Python was Developed by Guido Van Rossum and first released in 1991 . You can click on link to view him on LinkedIn to know what he has been doing recently.
- To Learn Python you need to Install it in your system.
- We will be using the Free Anaconda Distribution to install Python.
- This distribution has bundled Jupyter that we will be using as the IDE .
- To Download Python Search on Google – Anaconda or go to the below link https://www.anaconda.com/distribution/#download-section
Download the version based on your operating system like For Windows or MacOS or Linux
Unless and until you are working on a Project that demand Python 2.7 ( one of the most famous stable version still being widely used ) , Download the Python 3+ version as all updates comes in 3+ version and eventually 2+ would be deprecated.
The Download may take a while based on your internet speed. Once the Download is completed you can start the installation as below.
We recommend adding it to PATH environment variable. Once you click on the Check Box , a Warning will be displayed . If you are really sure that you do not want to add it to PATH you can un check this else you can ignore the warning and move ahead. Adding it to PATH allows you to call conda , jupyter notebook, and python at your command line .
After this the Installation starts
This is going to take a while . Once the installation completes you will get the below screen
Now to check if the Python got correctly installed and the path got correctly set up , open the command line prompt and type python and press “enter” . The python prompt opens up and you can write a basic command like – print(‘Hi Swara’)
Now that you have installed python and the path setup you can even install other dependencies or packages using easy_install . For this exit python by exit() and go to the command line prompt and run the below command
Now say we want to do Image Process using OpenCV so in order to Install Open CV for Python you can simply go to command line ? cmd and type the command ? easy_install opencv_python
How to run a Python File from command line
You can use any popular text editor like Notepad ++ or Sublime and write the python code as a text and run it from your command line prompt like below . i.e. first write a say very basic command like print(‘Hello Swara’)
And save this file as .py extension . In order to run this file from command line go to ? cmd ? go to the path where the file is kept
To run the python code enter ? python filename.py
Now if you want to run the code on Jupyter Notebook that comes by default with Anaconda Installation there are 3 different ways to Open Jupyter Notebook . Please visit our blog in this series to know how – https://instrovate.com/2019/06/09/start-jupyter-notebook-on-anaconda-installation-and-how-to-change-its-default-file-save-directory/
If you are looking for a Corporate Training / Consultancy work on Data Analytics , Data Visualization & Data Science using Tableau , Power BI , QlikSense & Python you can reach out at info@instrovate.com or visit the link – https://instrovate.com/