hadija
hadija

Reputation: 117

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?

Upvotes: 11

Views: 9556

Answers (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

Upvotes: 0

WaKoU
WaKoU

Reputation: 21

I have same issue and fixed it by:

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

Upvotes: 2

RossML
RossML

Reputation: 196

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 *

Upvotes: 18

Related Questions