pycaret
pycaret copied to clipboard
[BUG]: Import error in Pycaret 3.3.2
pycaret version checks
-
[X] I have checked that this issue has not already been reported here.
-
[X] I have confirmed this bug exists on the latest version of pycaret.
-
[X] I have confirmed this bug exists on the master branch of pycaret (pip install -U git+https://github.com/pycaret/pycaret.git@master).
Issue Description
I am having issue in importing pycaret regression module, which i always does untill till yesterday it was fine but now giving this issue.
Reproducible Example
code
from pycaret.regression import *
error-
[6](vscode-notebook-cell:?execution_count=2&line=6) from pycaret.regression import *
[7](vscode-notebook-cell:?execution_count=2&line=7) import plotly.express as px
[9](vscode-notebook-cell:?execution_count=2&line=9) from tqdm import tqdm
ValueError: Key backend: 'inline' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'nbAgg', 'QtAgg', 'QtCairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
Expected Behavior
import done
Actual Results
error-
[6](vscode-notebook-cell:?execution_count=2&line=6) from pycaret.regression import *
[7](vscode-notebook-cell:?execution_count=2&line=7) import plotly.express as px
[9](vscode-notebook-cell:?execution_count=2&line=9) from tqdm import tqdm
ValueError: Key backend: 'inline' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'nbAgg', 'QtAgg', 'QtCairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
Installed Versions
System: python: 3.11.0 PyCaret required dependencies: pip: 22.3 setuptools: 65.5.0 pycaret: 3.3.2 IPython: 8.25.0 ipywidgets: 8.1.3 tqdm: 4.66.4 numpy: 1.26.4 pandas: 2.1.4 jinja2: 3.1.4 scipy: 1.11.4 joblib: 1.4.2 sklearn: 1.4.2 pyod: 2.0.0 imblearn: 0.12.3 category_encoders: 2.6.3 lightgbm: 4.3.0 numba: 0.59.1 requests: 2.32.3 ...
Hello, I think the problem is not with pycaret, but with the installation of third-party packages. For example, the pycaret installation does not allow joblib 1.4 and you have it installed...
I advise you to reinstall pycaret so that all packages are in compliance. ex: pip install --upgrade pycaret or pip install --upgrade pycaret[full]
now I have job lib 1.3.2 , I have used pip install --upgrade pycaret, still I am having the same issue - ValueError: Key backend: 'inline' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'nbAgg', 'QtAgg', 'QtCairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
i still think problem is other package, not pycaret... maybe matplotlib or notebook... or try pip install --upgrade pycaret[full]
if nothink work, you need to start in a new clean environment...
PyCaret has several dependencies that must be installed. Install them using: pip install -r https://raw.githubusercontent.com/pycaret/pycaret/master/requirements.txt
Create and activate a virtual environment to avoid conflicts with other packages.
python -m venv myenv
source myenv/bin/activate # On Windows use myenv\Scripts\activate
pip install pycaret
Check PyCaret Compatibility: Some versions of PyCaret are incompatible with specific versions of dependencies. Ensure you have compatible versions of all dependencies.
pip install pycaret==[version]