shankarpandala / lazypredict

Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning
MIT License
2.76k stars 317 forks source link

No module named 'lazypredict.Supervised'; 'lazypredict' is not a package #399

Open JavadMAlizadeh opened 1 year ago

JavadMAlizadeh commented 1 year ago

I've already installed Lazypredict; however, I get the following error:

Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 8.7.0 -- An enhanced Interactive Python. Type '?' for help. PyDev console: using IPython 8.7.0 Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32 runfile('C:/Program Files/JetBrains/Pycharm/Temple/Machine_Learning/Lazy_Predict/lazypredict.py', wdir='C:/Program Files/JetBrains/Pycharm/Temple/Machine_Learning/Lazy_Predict') Traceback (most recent call last): File "C:\Users\Acer\AppData\Local\Programs\Python\Python39\lib\site-packages\IPython\core\interactiveshell.py", line 3433, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in runfile('C:/Program Files/JetBrains/Pycharm/Temple/Machine_Learning/Lazy_Predict/lazypredict.py', wdir='C:/Program Files/JetBrains/Pycharm/Temple/Machine_Learning/Lazy_Predict') File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Program Files/JetBrains/Pycharm/Temple/Machine_Learning/Lazy_Predict/lazypredict.py", line 1, in from lazypredict.Supervised import LazyClassifier File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, *kwargs) File "C:\Program Files\JetBrains\Pycharm\Temple\Machine_Learning\Lazy_Predict\lazypredict.py", line 1, in from lazypredict.Supervised import LazyClassifier File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, args, **kwargs) ModuleNotFoundError: No module named 'lazypredict.Supervised'; 'lazypredict' is not a package

lyraxvincent commented 1 year ago

Hi @JavadMAlizadeh , I had a similar problem while working in a virtual environment. I solved it by doing !pip install lazypredict inside the jupyter notebook I was working from.

ArijitSinghEDA commented 5 months ago

@JavadMAlizadeh I was facing the same issue and I found out the error. It is because we had named our files "lazypredict.py", which confused the interpreter. Changing the filename will work just fine