SlideShare a Scribd company logo
How to Install Numpy, Scipy,
Matplotlib,Pandas & Scikit-Learn
on Mac
Python comes loaded with powerful packages that make machine learning tasks easier. This is
why it is the language of choice among data scientists. Of the vast collection of libraries that you
can choose from, there are a set of basic libraries you should be familiar with as a beginner.

In this tutorial we are going to install these basic libraries on our system using Python’s built in
package manager PIP.

Numpy:
NumPy (stands for Numerical Python) provides useful features for operations on n-arrays and
matrices in Python. It provides vectorization of mathematical operations on the NumPy array type.

Installation:
1. In the terminal type the command sudo pip install numpy
2. For security reasons, you will be asked to enter your password. 

3. Installation will take only a few seconds.

Numpy is now installed on your system.

Testing:
1. In the terminal, start Python by typing the command python
2. Use the following error handling block:

try:

import numpy

except ImportError:

print (“numpy is not installed”)

3. If numpy is installed successfully, then you will not get any message in the terminal.

Otherwise you will get an error message saying “numpy is not installed”.

Troubleshooting:
If you get the error message, try this command sudo pip install -U numpy
Scipy:
SciPy contains modules for linear algebra, optimization, integration, and statistics. It is built upon
NumPy. It provides efficient numerical routines as numerical integration, optimization, and more
via specific submodules. 

Installation:
1. In the terminal type the command sudo pip install scipy
2. For security reasons, you will be asked to enter your password. 

3. Installation will take only a few seconds.

Scipy is now installed on your system.

Testing:
1. In the terminal, start Python by typing the command python
2. Use the following error handling block:

try:

import scipy

except ImportError:

print (“scipy is not installed”)

3. If scipy is installed successfully, then you will not get any message in the terminal.

Otherwise you will get an error message saying “scipy is not installed”.

Troubleshooting:
If you get the error message, try this command sudo pip install -U scipy
Matplotlib:
It is used for the generation of simple and powerful visualizations.

You can make just about any visualizations such as bar charts, histograms &

pie charts. There are facilities for creating labels, grids and other formatting elements.

Installation:
1. In the terminal type the command sudo pip install matplotlib
2. For security reasons, you will be asked to enter your password. 

3. Installation will take only a few seconds.

Matplotlib is now installed on your system.

Testing:
1. In the terminal, start Python by typing the command python
2. Use the following error handling block:

try:

import matplotlib

except ImportError:

print (“matplotlib is not installed”)

3. If matplotlib is installed successfully, then you will not get any message in the terminal.

Otherwise you will get an error message saying “matplotlib is not installed”.

Troubleshooting:
If you get the error message, try this command sudo pip install -U matplotlib
Pandas:
Pandas works with “labeled” and “relational” data. Pandas is primarily used for data wrangling. It
was designed for quick and easy data manipulation, aggregation, and visualization.

Installation:
1. In the terminal type the command sudo pip install pandas
2. For security reasons, you will be asked to enter your password. 

3. Installation will take only a few seconds.

Pandas is now installed on your system.

Testing:
1. In the terminal, start Python by typing the command python
2. Use the following error handling block:

try:

import pandas

except ImportError:

print (“pandas is not installed”)

3. If pandas is installed successfully, then you will not get any message in the terminal.

Otherwise you will get an error message saying “pandas is not installed”.

Troubleshooting:
If you get the error message, try this command sudo pip install -U pandas
Scikit-Learn:
This package is built on the top of SciPy and makes heavy use of its mathematical operations.

It provides access to common machine learning algorithms, making it simple to bring machine
learning into any project. It is easy to use and is great for playing around with machine learning
concepts.

Installation:
1. In the terminal type the command sudo pip install scikit-learn
2. For security reasons, you will be asked to enter your password. 

3. Installation will take only a few seconds.

Scikit-Learn is now installed on your system.

Testing:
1. In the terminal, start Python by typing the command python
2. Use the following error handling block:

try:

import scikit-learn

except ImportError:

print (“scikit-learn is not installed”)
3. If scikit-learn is installed successfully, then you will not get any message in the terminal.

Otherwise you will get an error message saying “scikit-learn is not installed”.

Troubleshooting:
If you get the error message, try this command sudo pip install -U scikit-learn
You are now armed with the basic tools that you need to begin your data science journey.

More Related Content

PDF
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Linux
PDF
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Windows
PDF
How to Install Python on Linux
PDF
SSMF (Security Scope Metasploit Framework) - Course Syllabus
PPT
Automated Penetration Testing With The Metasploit Framework
PDF
How to Install Python on Mac
PDF
manual-doc_inst_macosx-20-05-2004_00-24-48
PPTX
Using strace
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Linux
How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Windows
How to Install Python on Linux
SSMF (Security Scope Metasploit Framework) - Course Syllabus
Automated Penetration Testing With The Metasploit Framework
How to Install Python on Mac
manual-doc_inst_macosx-20-05-2004_00-24-48
Using strace

What's hot (19)

PPTX
Intro to exploits in metasploitand payloads in msfvenom
PDF
Pentest with Metasploit
PDF
Pen-Testing with Metasploit
PDF
Metasploit Humla for Beginner
PPTX
Defeating public exploit protections (EMET v5.2 and more)
PPTX
Metasploit
PDF
Information gathering
PPTX
Reversing malware analysis training part7 unpackingupx
PPTX
Metasploit For Beginners
PDF
Metasploit Basics
PPTX
Reversing & malware analysis training part 1 lab setup guide
PPTX
Finalppt metasploit
PPTX
Metasploit
PPTX
Advanced malware analysis training session 7 malware memory forensics
PPTX
Metasploit framwork
PPTX
Penetration testing using metasploit
PDF
Wordpress security
PPTX
PHPCS (PHP Code Sniffer)
PDF
iCrOSS 2013_Pentest
Intro to exploits in metasploitand payloads in msfvenom
Pentest with Metasploit
Pen-Testing with Metasploit
Metasploit Humla for Beginner
Defeating public exploit protections (EMET v5.2 and more)
Metasploit
Information gathering
Reversing malware analysis training part7 unpackingupx
Metasploit For Beginners
Metasploit Basics
Reversing & malware analysis training part 1 lab setup guide
Finalppt metasploit
Metasploit
Advanced malware analysis training session 7 malware memory forensics
Metasploit framwork
Penetration testing using metasploit
Wordpress security
PHPCS (PHP Code Sniffer)
iCrOSS 2013_Pentest
Ad

Similar to How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Mac (20)

PPTX
Data Analysis packages
PDF
NumPy and SciPy for Data Mining and Data Analysis Including iPython, SciKits,...
PPTX
Introduction to Machine Learning by MARK
PDF
DS LAB MANUAL.pdf
PDF
Scientific Python
PDF
Python for Data Science: A Comprehensive Guide
PPT
PDF
matplotlib fully explained in detail with examples
PPTX
CS301_Detailed_Overview_MATLAB_Mathematica_Python.pptx
PPTX
Introduction to numpy
PDF
Mastering pandas 1st Edition Femi Anthony
PPTX
Data Science With Python | Python For Data Science | Python Data Science Cour...
DOCX
Machine learning Experiments report
PDF
Download full ebook of Mastering Pandas Femi Anthony instant download pdf
PPTX
Introduction_to_Python.pptx
PPTX
Python-Libraries,Numpy,Pandas,Matplotlib.pptx
PPTX
Scipy Libraries to Work with Various Datasets.pptx
PPTX
Introduction to Pylab and Matploitlib.
PDF
Python for Data Science 1 / converted Edition Yuli Vasiliev
PPTX
Numpy and Pandas Introduction for Beginners
Data Analysis packages
NumPy and SciPy for Data Mining and Data Analysis Including iPython, SciKits,...
Introduction to Machine Learning by MARK
DS LAB MANUAL.pdf
Scientific Python
Python for Data Science: A Comprehensive Guide
matplotlib fully explained in detail with examples
CS301_Detailed_Overview_MATLAB_Mathematica_Python.pptx
Introduction to numpy
Mastering pandas 1st Edition Femi Anthony
Data Science With Python | Python For Data Science | Python Data Science Cour...
Machine learning Experiments report
Download full ebook of Mastering Pandas Femi Anthony instant download pdf
Introduction_to_Python.pptx
Python-Libraries,Numpy,Pandas,Matplotlib.pptx
Scipy Libraries to Work with Various Datasets.pptx
Introduction to Pylab and Matploitlib.
Python for Data Science 1 / converted Edition Yuli Vasiliev
Numpy and Pandas Introduction for Beginners
Ad

More from Vinita Silaparasetty (10)

PDF
R Upgrade Instructions
PDF
Installation instructions for R
PDF
Reshape2 Installation Instructions
PDF
Dplyr Installation Instructions
PDF
Ggplot2 Installation Instructions
PDF
PDF
Motion Sensing Couture
PPTX
What is Jupyter Notebook?
PDF
How to Install Python on Windows
R Upgrade Instructions
Installation instructions for R
Reshape2 Installation Instructions
Dplyr Installation Instructions
Ggplot2 Installation Instructions
Motion Sensing Couture
What is Jupyter Notebook?
How to Install Python on Windows

Recently uploaded (20)

PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPT
Quality review (1)_presentation of this 21
PPT
Reliability_Chapter_ presentation 1221.5784
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PDF
Business Analytics and business intelligence.pdf
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PDF
Foundation of Data Science unit number two notes
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Database Infoormation System (DBIS).pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
IB Computer Science - Internal Assessment.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Quality review (1)_presentation of this 21
Reliability_Chapter_ presentation 1221.5784
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Business Analytics and business intelligence.pdf
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Introduction-to-Cloud-ComputingFinal.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Foundation of Data Science unit number two notes
Fluorescence-microscope_Botany_detailed content
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Database Infoormation System (DBIS).pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Data_Analytics_and_PowerBI_Presentation.pptx
Miokarditis (Inflamasi pada Otot Jantung)
MODULE 8 - DISASTER risk PREPAREDNESS.pptx

How to Install numpy, scipy, matplotlib, pandas and scikit-learn on Mac

  • 1. How to Install Numpy, Scipy, Matplotlib,Pandas & Scikit-Learn on Mac Python comes loaded with powerful packages that make machine learning tasks easier. This is why it is the language of choice among data scientists. Of the vast collection of libraries that you can choose from, there are a set of basic libraries you should be familiar with as a beginner. In this tutorial we are going to install these basic libraries on our system using Python’s built in package manager PIP. Numpy: NumPy (stands for Numerical Python) provides useful features for operations on n-arrays and matrices in Python. It provides vectorization of mathematical operations on the NumPy array type. Installation: 1. In the terminal type the command sudo pip install numpy 2. For security reasons, you will be asked to enter your password. 3. Installation will take only a few seconds. Numpy is now installed on your system. Testing: 1. In the terminal, start Python by typing the command python 2. Use the following error handling block: try: import numpy except ImportError: print (“numpy is not installed”) 3. If numpy is installed successfully, then you will not get any message in the terminal. Otherwise you will get an error message saying “numpy is not installed”. Troubleshooting: If you get the error message, try this command sudo pip install -U numpy Scipy: SciPy contains modules for linear algebra, optimization, integration, and statistics. It is built upon NumPy. It provides efficient numerical routines as numerical integration, optimization, and more via specific submodules. Installation:
  • 2. 1. In the terminal type the command sudo pip install scipy 2. For security reasons, you will be asked to enter your password. 3. Installation will take only a few seconds. Scipy is now installed on your system. Testing: 1. In the terminal, start Python by typing the command python 2. Use the following error handling block: try: import scipy except ImportError: print (“scipy is not installed”) 3. If scipy is installed successfully, then you will not get any message in the terminal. Otherwise you will get an error message saying “scipy is not installed”. Troubleshooting: If you get the error message, try this command sudo pip install -U scipy Matplotlib: It is used for the generation of simple and powerful visualizations. You can make just about any visualizations such as bar charts, histograms & pie charts. There are facilities for creating labels, grids and other formatting elements. Installation: 1. In the terminal type the command sudo pip install matplotlib 2. For security reasons, you will be asked to enter your password. 3. Installation will take only a few seconds. Matplotlib is now installed on your system. Testing: 1. In the terminal, start Python by typing the command python 2. Use the following error handling block: try: import matplotlib except ImportError: print (“matplotlib is not installed”) 3. If matplotlib is installed successfully, then you will not get any message in the terminal. Otherwise you will get an error message saying “matplotlib is not installed”. Troubleshooting: If you get the error message, try this command sudo pip install -U matplotlib
  • 3. Pandas: Pandas works with “labeled” and “relational” data. Pandas is primarily used for data wrangling. It was designed for quick and easy data manipulation, aggregation, and visualization. Installation: 1. In the terminal type the command sudo pip install pandas 2. For security reasons, you will be asked to enter your password. 3. Installation will take only a few seconds. Pandas is now installed on your system. Testing: 1. In the terminal, start Python by typing the command python 2. Use the following error handling block: try: import pandas except ImportError: print (“pandas is not installed”) 3. If pandas is installed successfully, then you will not get any message in the terminal. Otherwise you will get an error message saying “pandas is not installed”. Troubleshooting: If you get the error message, try this command sudo pip install -U pandas Scikit-Learn: This package is built on the top of SciPy and makes heavy use of its mathematical operations. It provides access to common machine learning algorithms, making it simple to bring machine learning into any project. It is easy to use and is great for playing around with machine learning concepts. Installation: 1. In the terminal type the command sudo pip install scikit-learn 2. For security reasons, you will be asked to enter your password. 3. Installation will take only a few seconds. Scikit-Learn is now installed on your system. Testing: 1. In the terminal, start Python by typing the command python 2. Use the following error handling block: try: import scikit-learn except ImportError: print (“scikit-learn is not installed”)
  • 4. 3. If scikit-learn is installed successfully, then you will not get any message in the terminal. Otherwise you will get an error message saying “scikit-learn is not installed”. Troubleshooting: If you get the error message, try this command sudo pip install -U scikit-learn You are now armed with the basic tools that you need to begin your data science journey.