10

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?

hadija
  • 107
  • 1
  • 5

3 Answers3

18

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 *
RossML
  • 196
  • 1
  • 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
WaKoU
  • 21
  • 1
0

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