Installing pandas, just like the NumPy and SciPy stack can be a little trickier for inexperienced users. The easiest way to install pandas is to install it as part of the Anaconda distribution - a cross platform distribution for data analysis and scientific computing. This is the recommended installation method for most users. Installing with Anaconda will not only install pandas, but will also install Python and the most popular packages for scientific computing that make up the SciPy stack, such as IPython, NumPy, Matplotlib, and so on. See a full list of the packages available as part of the Anaconda distribution here . Anaconda is a cross-platform distribution, installable to Linux, Mac OS X and Windows.
After running Anaconda installer, you will have access to pandas and the rest of the SciPy stack without a need to install anything else, and without needing to wait for any software to be compiled. Installation instructions for Anaconda using bash script can be found here: install-python-anaconda-and-use-ipython-notebbok-4377
Installing with Anaconda does not require any admin privileges, its installation goes to the user’s home directory. This way of installing has a great advantage as it makes it easy to get rid of Anaconda, if you no longer need it at a later time by simply deleting the Anaconda folder.
If you are not interested in installing pandas via Anaconda distribution, you can simply install it by using conda:
Code: Select all
conda install pandas
Code: Select all
conda install pandas=0.22.0
Note that you need to install Miniconda in order to be able to use conda, go to https://conda.io/docs/user-guide/install/index.html and install it.
We can then install pandas and other packages using Miniconda. This is the best way to install packages if you need more control in managing them, or if you are running under a limited internet bandwidth. Miniconda allows users to create a minimal self contained Python installation, and then use the conda command to install additional packages as deems fit.
To use Miniconda, we will need to create a conda environment. This is analogous to Python virtualenv. Just like Python virtualenv, conda allows you to specify precisely which Python version to install/use with.
Now, to create a new conda environment, run the following command in the Terminal window:
Code: Select all
conda create -n name_of_your_env python
To create a minimal environment for Python 3, you just need to specify the Python version:
Code: Select all
conda create -n name_of_your_env python3
Code: Select all
source activate name_of_your_env
Code: Select all
activate name_of_your_env
Finally, after creating and putting yourself inside the conda environment, you can install pandas and many other packages, such as Ipython, pip, etc., respectively, by running the below commands.
Install pandas:
Code: Select all
conda install pandas
Code: Select all
conda install ipython
Code: Select all
conda install pip
Code: Select all
conda install anaconda
pandas can be installed via pip from PyPI. Just like you can install any other packages that are available to pip but not conda, first install pip (for example via Miniconda as we have seen above) and use it to install other packages (see examples here):
Install pandas with pip:
Code: Select all
pip install pandas
Code: Select all
pip3 install pandas
Install Django:
Code: Select all
pip install django
There are a lot of options to install pandas. You can install pandas for Python 3 from your distribution, for example, to install pandas for Ubuntu, Debian, Linux Mint, run:
Code: Select all
sudo apt-get install python3-pandas
To install pandas on other Linux-based distributions;
OpenSuse:
Code: Select all
zypper in python3-pandas
Code: Select all
dnf install python3-pandas
Code: Select all
yum install python3-pandas
To install pandas for Python 2, use the package python-pandas.
The packages in the Linux package managers may in most cases be few versions behind the newest releases, so to get the newest version of pandas, it’s recommended to install using the pip or conda methods described above.
Find out more about Pandas:
http://pandas.pydata.org/pandas-docs/st ... ntributing
http://pandas.pydata.org/pandas-docs/st ... ng-dev-env