1

I am trying this code in Google Colab

!pip install pycaret

As part of the install it gives this message

Installing collected packages: jinja2
  Attempting uninstall: jinja2
    Found existing installation: Jinja2 3.1.2
    Uninstalling Jinja2-3.1.2:
      Successfully uninstalled Jinja2-3.1.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
google-colab 1.0.0 requires requests~=2.23.0, but you have requests 2.27.1 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
Successfully installed jinja2-2.11.3

But when I try to use the following comamnd

    from pycaret.datasets import get_data
    dataset = get_data('mice')
    from pycaret.anomaly import *
    exp_ano101 = setup(data, normalize = True, 
                   ignore_features = ['MouseID'],
                   session_id = 123)

It gives me the following error

ImportError: Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2.

Can you please give me some pointers.

furas
  • 134,197
  • 12
  • 106
  • 148
  • you should check what Python's version you use - if you use `python3.8` then you may need to use `pip3` or even `pip3.8` because `pip` may install for `python2` (and different versions don't share modules) – furas May 08 '22 at 12:42
  • Does this answer your question? [Unable to resolve import error from PyCaret](https://stackoverflow.com/questions/72090241/unable-to-resolve-import-error-from-pycaret) – user2314737 May 08 '22 at 13:57

0 Answers0