Search code examples
pythonimportpipgoogle-colaboratorypycaret

Cannot import pycaret in google colab


I cant import pycaret in a google colab

Here are all the steps I had taken:

Change python version to 3.8

Installed pip

I then ran

!pip install pycaret 
import pycaret

the install works, but then

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-27-fdea18e6876c> in <module>
      1 get_ipython().system('pip install pycaret ')
----> 2 import pycaret

ModuleNotFoundError: No module named 'pycaret'

I must be doing something very wrong!

In troubleshooting I also pip installed numpy and pandas which both imported just fine


Solution

  • For importing use this, this is one is for classification:

    from pycaret.classification import *
    

    And for regression:

    from pycaret.regression import *
    

    For NLP:

    from pycaret.nlp import *