'Unable to resolve import error from PyCaret

I am trying to install pycaret by creating an environment in anaconda (python 3.8). Everything is fine except when i tried to from pycaret.classification import * i shows an error despite the fact that i have installed all dependencies:

ImportError: Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2. I tried refreshing the kernel and reinstalling Jinja2 but the error remains. May i know how could i overcome it?



Solution 1:[1]

I had same issue in colab, I fixed it by forcing the markupsafe version:

pip install markupsafe==2.0.1

After this, the next imports worked as before

import jinja2
pycaret.classification import *

Solution 2:[2]

I have same issue and fixed it by:

!pip install pycaret==2.3.10 markupsafe==2.0.1 pyyaml==5.4.1 -qq

Solution 3:[3]

Thank you. So when I ran the above statement it gave me some compatibility error. So I executed the following statement

!pip uninstall imgaug && pip uninstall albumentations && pip install git+https://github.com/aleju/imgaug.git

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RossML
Solution 2 WaKoU
Solution 3 Lavanya Manickavachakam