PyCaret 2.1 is now available. Click here to see release notes. Documentation on the website is only updated for major releases. To see the latest documentation, Click Here
Installing PyCaret is the first step towards building your first machine learning model in PyCaret. Installation is easy and takes only a few minutes. All dependencies are also installed with PyCaret. Click here to see the complete list of dependencies.
Make sure compilers (gcc, g, build-essential) and Python development tools (python-dev, python3-dev) are installed. In Red Hat systems, install the packages gcc64 and gcc64-c. If you are using a VM, be aware that you will need at least 4GB of memory to install fbprophet, and at least 2GB of memory to use fbprophet. Initially, GCC handled only the C programming language, but with the development of additional front ends, GCC expanded to compile C, Objective-C, Objective-C, Go, Fortran, Ada, Java and others. GCC also offers support for a wide variety of processor architectures and, as. This post will guide you how to install GNU Gcc compiler on Mac OS X system. How do I install command line tool for xcode package to install Gcc compiler on Mac OS system. How to install gcc command line tool in Mac OS Sierra. The GNU Compiler Collection or GCC for short, comprises front ends for C, Objective-C, C, Java, Fortran, Go and Ada, along with libraries for the mentioned languages. GCC us the main component of the GNU toolchain, it is distributed under the GNU General Public License and plays a central role in the continuous growth of free software.
In the above cmake command, we use the flag GRPYTHONDIR to tell GNU Radio where to install its Python scripts and related SWIG libraries. The path noted in that command will work for the MacPorts installed python2.7 command.
In order to avoid potential conflicts with other packages it is strongly recommended to use a virtual environment, e.g. python3 virtualenv (see python3 virtualenv documentation) or conda environments. Using an isolated environment makes it possible to install a specific version of pycaret and its dependencies independently of any previously installed Python packages. See an example below of how to create a conda environment and install PyCaret.
The following libraries have been removed from hard dependency in PyCaret 2.0. Hence they must be installed separately when specific functionalities are being used. See the code below on how to install these dependencies.
PyCaret is a fast-evolving machine learning library. Often, you want to have access to the latest features but want to avoid compiling PyCaret from source or waiting for the next release. Fortunately, you can now install pycaret-nightly using pip.
We highly recommend to install pycaret-nightly in a virtual environment to avoid conflicts.
You can use PyCaret in your choice of Integrated Development Environment (IDE) but since it uses html and several other interactive widgets, it is optimized for use within notebook environment, be it Jupyter Notebook, Jupyter Lab, Azure Notebooks or Google Colab.
Learn how to install Jupyter Notebook
Learn how to install Jupyter Lab
Get Started with Azure Notebooks
Get Started with Google Colab
Get Started with Anaconda Distribution
A Docker container runs in a virtual environment and is the easiest way deploy applications using PyCaret. Dockerfile from base image python:3.7 and python:3.7-slim is tested for PyCaret 2.0.
You can also download the source file from the link below and use the pip installer to install the package from a downloaded file. To install the package using the source file, download the file and use the command line or notebook environment to run the below cell of code.

Update Gcc Mac
PyCaret uses interactive plotting ability. In order to render interactive plots in Google Colab, run the below line of code in your colab notebook.
MAC users will have to install LightGBM separately using Homebrew, or can be built using CMake and Apple Clang or gcc. See the instructions below:
- Install CMake (3.16 or higher)
>> brew install cmake - Install OpenMP
- >> brew install libomp
- Run the following command in terminal:
An open-source, low-code machine learning library in Python
https://github.com/pycaret/pycaret
605 forks.
2,896 stars.
157 open issues.
Recent commits:
- KFold random state fix, Antoni Baum
- Remove debug, Antoni Baum
- Fix getting tunable best params, Antoni Baum
- Delete PULL_REQUEST_TEMPLATE.md, GitHub
- Merge pull request #1021 from rajpratyush/masterCreate pull_request_template, GitHub
Mac Gcc Install
The following is addressed to an audience who is just getting started withPython and would benefit from additional guidance on how to install PyStan.
Installing PyStan requires installing:
- Python
- C++ -compiler
- Python dependencies
- PyStan
It is highly recommended to know what bash
is and the basics ofnavigating the terminal. You can review or learn it from the SoftwareCarpentry (bash lesson here).
Lessons 1 - 3 are probably the most important.
Installing Python¶
The easiest way to install Python is to use the Anaconda distributionof python. It can be downloaded here.
This is because PyStan (and many python tools) require packages (akamodules) that have C dependencies. These types of dependencies areunable to be installed (at least easily) using pip
, which is acommon way to install python packages. Anaconda ships with it’s ownpackage manager (that also plays nicely with pip
) called conda
,and comes with many of the data analytics packages and dependenciespre-installed.
Don’t worry about Anaconda ruining your current Python installation, itcan be easily uninstalled (described below).
Anaconda is not a requirement¶
Anaconda is not an absolute requirement to get pystan
to work. Aslong as you can get the necessary python dependencies installed, pystanwill work. If you want to install Anaconda, follow the Windows, Macs,and Linux instructions below.
Linux¶
After downloading the installer execute the associated shell script. Forexample, if the file downloaded were named Anaconda3-4.1.1-Linux-x86_64.sh
you would enter bashAnaconda3-4.1.1-Linux-x86_64.sh
in the directory whereyou downloaded the file.
Macs¶
Mac Install Gcc Without Xcode
After downloading the installer, double click the .pkg file and followthe instructions on the screen. Use all of the defaults forinstallation.
Windows¶
PyStan on Windows is partially supported. See PyStan on Windows.
The Anaconda installer should be able to be double-clicked andinstalled. Use all of the defaults for installation except make sure tocheck Make Anaconda the default Python.
Uninstalling Anaconda¶
The default location for anaconda can be found in your home directory.Typically this means it in in the ~/anaconda
or ~/anaconda3
directory when you open a terminal.
Python dependencies¶
If you used the Anaconda installer, numpy and cython should already beinstalled, so additional dependencies should not be needed. However,should you need to install additional dependencies, we can use conda
to install them as such:
- open a terminal
- type
condainstallnumpy
to install numpy or replacenumpy
with the package you need to install - common additional packages include
arviz
,matplotlib
,pandas
,scipy
Setting up C++ compiler¶
PyStan 2.19+ needs a C++14 compatible compiler. For GCC 4.9.3+ andGCC 5+ versions are up-to-date. To update your compiler, follow generalinstructions given for each platform.
- Linux: Install compiler with
apt
/yum
- Macs: Install latest XCode, or use
brew
ormacports
- Windows: Follow instructions in PyStan on Windows.
To use gcc
/clang
compiler from the conda
follow instructions inhttps://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.htmland set-up your CC
and CXX
environmental variables as given below. Instructions belowassume default Anaconda environment. For conda-forge
follow installationinstructions in anaconda.org.
- open a terminal
- Linux:
condainstallgcc_linux-64gxx_linux-64-canaconda
- Macs:
condainstallclang_osx-64clangxx_osx-64-canaconda
To check your compiler version
- Open a terminal
- Linux: type
gcc--version
- OSX: type
clang--version
To use specific C++ compiler (Linux: gcc_linux-64
, gxx_linux-64
, OSX: clang_osx-64
, clangxx_osx-64
), either update your CC
and CXX
environmentalvariables or set-up your path to include folder containing compilers(e.g.``which gcc_linux-64``)

- type
exportCC=gcc_linux-64
andexportCXX=g++_linux-64
- type
exportPATH=/path/to/Anaconda/bin:$PATH
Conda will create a new name for the compiler. You’ll need to search in the <path to conda>/bin folder to find the name. which python will show this location. For example:
- Open a terminal
- OSX: type
ls<pathtopythonenv>/bin/|grepclang
You should see two compilers like x86_64-apple-darwin13.4.0-clang
and x86_64-apple-darwin13.4.0-clang++
.
- type
exportCC=x86_64-apple-darwin13.4.0-clang
andexportCXX=x86_64-apple-darwin13.4.0-clang++
Installing PyStan¶

Since we have the numpy
and cython
dependencies we need, we caninstall the latest version of PyStan using pip
. To do so:
- open a terminal
- type
pipinstallpystan
