💻
Installation
A step-by-step guide to install PyCaret in Python
PyCaret is tested and supported on 64-bit systems with:
- Python 3.7, 3.8, 3.9, and 3.10
- Ubuntu 16.04 or later
- Windows 7 or later
You can install PyCaret with Python's pip package manager:
1
pip install pycaret
PyCaret's default installation will not install all the optional dependencies automatically. Depending on the use case, you may be interested in one or more extras:
# install analysis extras
pip install pycaret[analysis]
# models extras
pip install pycaret[models]
# install tuner extras
pip install pycaret[tuner]
# install mlops extras
pip install pycaret[mlops]
# install parallel extras
pip install pycaret[parallel]
# install test extras
pip install pycaret[test]
##
# install multiple extras together
pip install pycaret[analysis,models]
Check out all optional dependencies. If you want to install everything including all the optional dependencies:
1
# install full version
2
pip install pycaret[full]
Install the development version of the library directly from the source. The API may be unstable. It is not recommended for production use.
1
pip install git+https://github.com/pycaret/[email protected] --upgrade
Docker creates virtual environments with containers that keep a PyCaret installation separate from the rest of the system. PyCaret docker comes pre-installed with a Jupyter notebook. It can share resources with its host machine (access directories, use the GPU, connect to the Internet, etc.). The PyCaret Docker images are always tested for the latest major releases.
1
# default version
2
docker run -p 8888:8888 pycaret/slim
3
4
# full version
5
docker run -p 8888:8888 pycaret/full
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.
1
# create a conda environment
2
conda create --name yourenvname python=3.8
3
4
# activate conda environment
5
conda activate yourenvname
6
7
# install pycaret
8
pip install pycaret
9
10
# create notebook kernel
11
python -m ipykernel install --user --name yourenvname --display-name "display-name"
To train models on the GPU, simply pass
use_gpu = True
in the setup
function. There is no change in the use of the API; however, in some cases, additional libraries have to be installed. The following models can be trained on GPUs:- Extreme Gradient Boosting
- Catboost
- Logistic Regression, Ridge Classifier, Random Forest, K Neighbors Classifier, K Neighbors Regressor, Support Vector Machine, Linear Regression, Ridge Regression, Lasso Regression requires cuML >= 0.15
You can apply Intel optimizations for machine learning algorithms and speed up your workflows. To train models with Intel optimizations use
sklearnex
engine. There is no change in the use of the API, however, installation of Intel sklearnex is required:1
pip install scikit-learn-intelex
Last modified 2mo ago