Module Not found when importing PyCaret in Jupyter

Viewed 11322

I'm trying to learn PyCaret but having a problem when trying to import it in Jupyter Lab.

I'm working in a virtualenv and installed pycaret via pip:

pip install pycaret

I can confirm its installed via pip list:

prompt-toolkit            3.0.7
protobuf                  3.13.0
py                        1.9.0
pycaret                   2.1.2
pycparser                 2.20

The very first line in the notebook is:

from pycaret.nlp import *

however this results in:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-7c206b4a9ead> in <module>
----> 1 from pycaret.nlp import *
      2 import psycopg2
      3 import sys, os
      4 import numpy as np
      5 import pandas as pd

ModuleNotFoundError: No module named 'pycaret'

I'm pulling my hair out trying to figure this out and can't find anyone else with something similar. I've tried to import via the python shell as well and that works perfectly.

4 Answers

I read on the tutorial page of pycaret that to install it through a Jupyter-notebook you should add an exclamation mark in front of the python command in the Jupyter-cell:

!pip install pycaret

First Create a new environment conda documentation

Second Download the Pycaret with this instruction

Third check your sklearn version is greater thansklearn>=0.23.2. Because if it's greater PyCaret is not compatible with that.

Nothing works for you? Download directly from github with this command pip install git+https://github.com/pycaret/pycaret.git#egg=pycaret

Related