[Python] AssertionError: IPython must be installed to use initjs()! Run `pip install ipython`...

Discussão em 'Python' iniciado por Stack, Maio 3, 2025.

  1. Stack

    Stack Membro Participativo

    I installed IPython with pip install ipython and I could install it. However PyCharm gives this error:

    C:\Users\HP\PycharmProjects\CE475Exercises\CE475Project.py:150: FutureWarning:

    Passing palette without assigning hue is deprecated and will be removed in v0.14.0. Assign the y variable to hue and set legend=False for the same effect.

    sns.barplot(x='Importance', y='Feature', data=feature_importance_df, palette='viridis') Traceback (most recent call last): File "C:\Users\HP\PycharmProjects\CE475Exercises\CE475Project.py", line 162, in shap.initjs() File "C:\Users\HP\PycharmProjects\CE475Exercises\venv\Lib\site-packages\shap\plots_force.py", line 300, in initjs assert have_ipython, "IPython must be installed to use initjs()! Run pip install ipython and then restart shap." AssertionError: IPython must be installed to use initjs()! Run pip install ipython and then restart shap.

    And I checked the installation and it says that requirement already satisfied. What should I do for it?

    Continue reading...

Compartilhe esta Página