Python Machine Learning Environment Setup – Installation Process

Free Machine Learning courses with 130+ real-time projects Start Now!!

Python course with 57 real-time projects - Learn Python

1. Python Machine Learning Environment Setup

In this tutorial of Python Machine Learning Environment Setup, we will show you the way with setting your machine up for a Machine Learning environment with Python. Moreover, for Python Machine Learning installation, we will see the process to install Python and the needed Python Libraries such as NumPy, SciPy, Matplotlib etc.
So, let’s start the Python Machine Learning Environment Setup.

Python Machine Learning Environment Setup

2. How to Install Python?

Before anything else, you will need to Install Python on your machine. So, here are the steps to install Python. 

a. Plain download

You can download from the official website-
https://www.python.org/downloads/
At the time of writing, the latest version of Python is Python 3.7. This is what the installer looks like-

Python Machine Learning Environment Setup

For a detailed guide on how to set up Python for your machine, read up on A Step-by-Step Guide to Install Python for Windows.

b. Installing with Anaconda

Or you can install it with Anaconda-
https://www.anaconda.com/download/
This downloads Anaconda for us. Now to install it, we run the installer-

Python Machine Learning Environment Setup

Installing With Anaconda

Python Machine Learning Environment Setup

Installing With Anaconda

Python Machine Learning Environment Setup

Technology is evolving rapidly!
Stay updated with DataFlair on WhatsApp!!

Installing With Anaconda

Python Machine Learning Environment Setup

Python Machine Learning Environment Setup

And for the final options-

Python Machine Learning Environment Setup

Installing Anaconda

And then, it installs Anaconda-

Python Machine Learning Environment Setup

Installing Anaconda

3. Starting and Updating Anaconda

To confirm that your Anaconda environment is up to date, follow these steps-
1. Open Anaconda Prompt and type the following-

(base) C:\Users\Ayushi>conda -V

conda 4.5.8
2. Now the following command tells you about your Python environment-

(base) C:\Users\Ayushi>python -V

Python 3.6.5 :: Anaconda, Inc
3. Then, to confirm that the conda environment you hold is up to date-
Have a look at the future of Machine Learning

(base) C:\Users\Ayushi>conda update conda

Solving environment: done
# All requested packages already installed.

(base) C:\Users\Ayushi>conda update anaconda

Solving environment: done
# All requested packages already installed.

4. Installing Needed Python Libraries

Working with machine learning, we will need a few Python Libraries often. Here’s a list of some of those-

a. NumPy

Python Machine Learning Environment Setup

Python Libraries – NumPy

NumPy, a Python library that will let you handle multi-dimensional arrays and matrices. It also offers multiple high-level mathematical functions to operate on these.
You can install it as-

conda install numpy

b. SciPy

Python Machine Learning Environment Setup

Python Libraries – SciPy

SciPy is a scientific- and technical- computing Python library that is free and open-source. Install it as-

conda install scipy

c. Matplotlib

Python Machine Learning Environment Setup

Python Library – Matplotlib

Matplotlib, a Python library for plotting and has NumPy as its numerical mathematics extension. Install it as-

conda install matplotlib

d. pandas

Python Machine Learning Environment Setup

Python Library – Pandas

pandas is a software library for Python that comes in handy when working with data manipulation and analysis. Install it with the following command-

conda install pandas

e. statsmodels

Python Machine Learning Environment Setup

Python Library – StatsModels

This is a Python package that lets users explore data, estimate statistical models, and carry out statistical tests. You can install it as-

conda install statsmodels

f. seaborn

Python Machine Learning Environment Setup

Python Library – Seaborn

This is a Python library for data visualization and is based on Matplotlib. It offers a high-level interface for plotting statistical graphs that are attractive and informative. You can install it with the following command-

conda install seaborn

g. scikit-learn

Python Machine Learning Environment Setup

Python Library – Scikiy Learn

This is a free software ML library for Python. It offers facilities like classification, regression, and clustering algorithms.
Let’s discuss Machine Learning Algorithms
To find out which version of a library you’re using, you can run the following piece of code in the interpreter-

>>> import scipy
>>> scipy.__version__

‘1.1.0’

The command to install scikit-learn is conda install scikit-learn.

So, this was all in Python Machine Learning Environment Setup. Hope you like our explanation.

5. Conclusion

Hence, in this Python Machine Learning Environment Setup, we discussed how to install Python. Moreover, we saw the starting and updating of Anaconda. Also, in this Python machine Learning Environment Setup, we learned about the need libraries. If you follow all the steps mentioned above, you will successfully set up a machine learning environment for Python at a beginner level. Still, if any doubt regarding Python Machine Learning Environment Setup, ask in the comment tab. We will definitely get back to you.
See also – 
Python Web Framework 
For reference

Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

follow dataflair on YouTube

4 Responses

  1. selvapriya says:

    What are the libraries required for invoice extraction? And how to include Jupyter?

    • DataFlair says:

      We have many different techniques in python to extract data from invoice, like pdftotext , pdfminer or OCR — tesseract , tesseract4 or gvision (Google Cloud Vision). Jupyter is a web based IDE that you can use to run code.

  2. Vineet Chauhan says:

    Please add below line:

    conda install scikit-learn

  3. daniel says:

    what happen if i am not updating the anaconda,, becuase my pc does not update it?

Leave a Reply

Your email address will not be published. Required fields are marked *