Skip to content

Latest commit

 

History

History
227 lines (136 loc) · 5.43 KB

installation.md

File metadata and controls

227 lines (136 loc) · 5.43 KB
description
Learn how to install PyCaret

💻 Installation

{% hint style="info" %} PyCaret 3.0-rc is now available. pip install --pre pycaret to try it. Check out this example Notebook. {% endhint %}

Install

PyCaret is tested and supported on the following 64-bit systems:

  • Python 3.6 – 3.8
  • Python 3.9 for Ubuntu only
  • Ubuntu 16.04 or later
  • Windows 7 or later

Install PyCaret with Python's pip package manager.

pip install pycaret

To install the full version (see dependencies below):

pip install pycaret[full]

{% hint style="info" %} If you want to try our nightly build (unstable) you can install pycaret-nightly from pip. pip install pycaret-nightly {% endhint %}

Environment

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.

# create a conda environment
conda create --name yourenvname python=3.8

# activate conda environment
conda activate yourenvname

# install pycaret
pip install pycaret

# create notebook kernel
python -m ipykernel install --user --name yourenvname --display-name "display-name"

{% hint style="warning" %} PyCaret is not yet compatible with sklearn>=0.23.2. {% endhint %}

GPU

With PyCaret, you can train models on GPU and speed up your workflow by 10x. To train models on 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 as they are not installed with the default version or the full version. As of the latest release, the following models can be trained on GPU:

  • Extreme Gradient Boosting (requires no further installation)
  • Catboost (requires no further installation)
  • Light Gradient Boosting Machine requires GPU installation
  • 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

Dependencies

  • Default dependencies that are installed with pip install pycaret are listed here.
  • Optional dependencies that are installed with pycaret[full] are listed here.
  • Testing requirements are listed here.

Select the tab

{% tabs %} {% tab title="requirements" %} pandas

scipy<=1.5.4

seaborn

matplotlib

IPython

joblib

scikit-learn==0.23.2

ipywidgets

yellowbrick>=1.0.1

lightgbm>=2.3.1

plotly>=4.4.1

wordcloud

textblob

cufflinks>=0.17.0

umap-learn

pyLDAvis

gensim<4.0.0

spacy<2.4.0

nltk

mlxtend>=0.17.0

pyod

pandas-profiling>=2.8.0

kmodes>=0.10.1

mlflow

imbalanced-learn==0.7.0

scikit-plot

Boruta

pyyaml<6.0.0

numba<0.55 {% endtab %}

{% tab title="requirements-optional" %} shap

interpret<=0.2.4

tune-sklearn>=0.2.1

ray[tune]>=1.0.0

hyperopt

optuna>=2.2.0

scikit-optimize>=0.8.1

psutil

catboost>=0.23.2

xgboost>=1.1.0

explainerdashboard

m2cgen

evidently

autoviz

fairlearn

fastapi

uvicorn

gradio

fugue>=0.6.5

boto3

azure-storage-blob

google-cloud-storage {% endtab %}

{% tab title="requirements-test" %} pytest

moto

codecov {% endtab %} {% endtabs %}

{% hint style="info" %} NOTE: We are actively working on reducing default dependencies in the next major release. We intend to support functionality level and module-specific install in the future. For example: pip install pycaret[nlp]. {% endhint %}

Building from source

To install the package directly from GitHub (latest source), use the following command:

pip install git+https://github.com/pycaret/pycaret.git#egg=pycaret

Don't forget to include the #egg=pycaret part to explicitly name the project, this way pip can track metadata for it without having to have run the setup.py script.

Run the tests:

To launch the test suite, run the following command from outside the source directory:

pytest pycaret

Docker

Docker uses containers to create virtual environments that isolate a PyCaret installation from the rest of the system. PyCaret docker comes pre-installed with a Notebook environment. that can share resources with its host machine (access directories, use the GPU, connect to the Internet, etc.). The PyCaret Docker images are tested for each release.

docker run -p 8888:8888 pycaret/slim

For docker image with full version:

docker run -p 8888:8888 pycaret/full

To learn more, check out this documentation.