1

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

Phixed
  • 13
  • 5

3 Answers3

0
!pip install pycaret

should work without any issues. I have used it multiple times on Google Colab. Alternately, you can use

pip install --pre pycaret
Nikhil Gupta
  • 1,436
  • 12
  • 15
0

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 *
Alper Yilmaz
  • 36
  • 1
  • 6
0
!pip install --upgrade packaging -q
!pip install pycaret[full] -q
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
XEX
  • 27
  • 4
  • While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – Yunnosch Aug 04 '23 at 22:26