Python Machine Learning Environment Setup – Installation Process
Free Machine Learning courses with 130+ real-time projects Start Now!!
Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python
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.
It is also highly important to have a proper environment configured in order to work on machine learning. When organizing your environment, everything runs smoothly, and as you name it, there are few conflicts with dependencies and libraries as well as making your work easy and efficient. The environment should also be kept organized especially considering a project may require one to adhere to different standards. One of the benefits is that you can keep separate virtual spaces for different projects eliminating the issues with dependencies and different versions.
So, let’s start the Python Machine Learning Environment Setup.
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-
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-
And for the final options-
And then, it installs Anaconda-
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.
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
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
SciPy is a scientific- and technical- computing Python library that is free and open-source. Install it as-
conda install scipy
c. Matplotlib
Matplotlib, a Python library for plotting and has NumPy as its numerical mathematics extension. Install it as-
conda install matplotlib
d. 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
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
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
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.
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
What are the libraries required for invoice extraction? And how to include Jupyter?
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.
Please add below line:
conda install scikit-learn
what happen if i am not updating the anaconda,, becuase my pc does not update it?