How To Install Python Package Numpy, Pandas, Scipy, Matplotlib On Windows, Mac And Linux

If you want to do data analysis in python, you always need to use python packages like Numpy, Pandas, Scipy and Matplotlib etc. All those python packages are so powerful and useful to do Base N-dimensional array computing( Numpy ), Data structures & analysis ( Pandas ), scientific computing ( Scipy) and Comprehensive 2D Plotting ( Matplotlib ). But the first step is to install the related packages on your OS, this article will tell you how to install it on Windows, Mac and Linux.

1. Install Numpy, Pandas, Scipy, Matplotlib With Anacond.

Anaconda is a python edition which is used in scientific area, so if you install anaconda, all above packages will be installed automatically. So please read article How To Install Anaconda On Linux, Windows, MacOS Correctly to install anaconda first.

After installation, you can run command conda in a terminal to list above packages to make sure it has been installed correctly.

~$ conda list pandas
# packages in environment at /home/zhaosong/anaconda3:
#
# Name                    Version                   Build  Channel
pandas                    0.23.4           py37h04863e7_0

To list all installed anconda packages, just run $ conda list.

Run $ conda -h to list conda command help information.

If you want to remove / uninstall a package, run $ conda remove <package name>

2. Install Numpy, Pandas, Scipy, Matplotlib By PIP Command.

  1. First make sure pip has been installed on your OS. If not installed please refer article How To Install Python/Pip On Windows.
    ~$ pip --version
    pip 18.1 from /home/zhaosong/anaconda3/lib/python3.7/site-packages/pip (python 3.7)
    
  2. Run pip install command to install related packages.
    pip install numpy
    
    pip install pandas
    
    pip install scipy
    
    pip install matplotlib
    
    
  3. Run pip uninstall command to uninstall related packages.
    pip uninstall numpy
    
    pip uninstall pandas
    
    pip uninstall scipy
    
    pip uninstall matplotlib
  4. Run pip show command to display package install information.
    ~$ pip show pandas
    Name: pandas
    Version: 0.23.4
    Summary: Powerful data structures for data analysis, time series, and statistics
    Home-page: http://pandas.pydata.org
    Author: None
    Author-email: None
    License: BSD
    Location: /home/zhaosong/anaconda3/lib/python3.7/site-packages
    Requires: python-dateutil, pytz, numpy
    Required-by: seaborn, odo
    
READ :   How To Send Email Use Gmail Free SMTP Service

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.