mljar / mljar-supervised

Python package for AutoML on Tabular Data with Feature Engineering, Hyper-Parameters Tuning, Explanations and Automatic Documentation
https://mljar.com
MIT License
2.97k stars 392 forks source link

Cannot import supervised.automl #476

Open hokmingkwan opened 2 years ago

hokmingkwan commented 2 years ago

Hi there, after !pip install mljar-supervised , I tried to import from supervised.automl import AutoML , but I got this error ModuleNotFoundError: No module named 'supervised' Please let me know if you have any comments, thanks.

pplonski commented 2 years ago

Do you have any logs from installation? What system are you using?

hokmingkwan commented 2 years ago

Hi @pplonski I tried to install it on a Kaggle notebook.

pplonski commented 2 years ago

@hokmingkwan I was using it on kaggle notebooks. Can you paste the logs from installation?

Maybe try to add -U option to install command, it will force update of dependency packages.

pip install -U mljar-supervised
hokmingkwan commented 2 years ago

@pplonski this is the error message: ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I could install it but I have to ignore to install the package like this !pip install mljar-supervised --ignore-installed llvmlite

pplonski commented 2 years ago

@hokmingkwan I can reproduce the problem. Need to look deeper into dependencies ...

pplonski commented 2 years ago

@hokmingkwan I've removed the numba dependency from requirements and looks like it is working on kaggle. The update repo is in the check-dependency branch. You can test it by installing with the following command:

!pip install -U git+https://github.com/mljar/mljar-supervised.git@check-dependencies

There might be some warnings during installation - it's because there are already many different packages installed in the kaggle kernel.

hokmingkwan commented 2 years ago

@pplonski I've successfully installed and imported the package on kaggle. Thank you so much

sksuman97 commented 1 year ago

from supervised.automl import AutoML, not able to import. error-----> ModuleNotFoundError: No module named 'supervised'

pplonski commented 1 year ago

@sksuman97 have you installed mljar-supervised?

Install command

pip install -U mljar-supervised
cjgalvin commented 1 year ago

After successfully installing mljar-supervised via conda, I had a similar issue. So I will share my problem and solution in case it helps. TLDR: make sure your IDE is using the correct conda env or venv.

Dev environment: M1 Mac, Python 3.9, VS Code, testing in Jupyter notebook

In my case, I had created a new Conda env, installed everything in there. From terminal within VS Code, I activated this env. However, when I launched a Jupyter notebook, the kernel was a previous env that did not have the mljar package. Naturally, I could not import the module. After a frustrating 15 minutes, I realized the error and activated the correct kernal via VS Code (cmd + P, select Interpreter; or in the upper right of the notebook pane in VS Code). Worked afterward 🤦‍♂️

Biku247 commented 3 months ago

I am having the same issue. On Windows 11, I am creating a new anaconda environment with Python version 3.10. Then using conda install -c conda-forge mljar-supervised this command to install. It installs nicely but while importing through from supervised.automl import AutoML, it gives an error named ModuleNotFoundError: No module named 'supervised' I was not able to find any solution online. Any possible solution will be highly appreciated.

pplonski commented 3 months ago

Hi @Biku247,

Please make sure that you install and import in the same virtual environment.

BTW, we are working on a solution that will help users install/import python packages, it can be done with one-click. Here is a screenshot of our new IDE. It will be released soon. image