Palash Jhamb
Palash Jhamb

Reputation: 625

Import error in plotly while using FigureWidget

I am trying to use run the following commands in Jupyter notebook :

import ipywidgets
import plotly.graph_objs as go
print(ipywidgets.__version__)

f = go.FigureWidget()
f

I am getting the following error

ImportError: Please install ipywidgets>=7.0.0 to use the FigureWidget class

My ipywidgets version is 7.5.1. How to resolve this issue ?

Upvotes: 4

Views: 2900

Answers (1)

Jaume Clave
Jaume Clave

Reputation: 93

I had the same issue. I first upgraded my pip by finding the location of python.exe and running python.exe -m pip install --upgrade pip on my Terminal.

WARNING: You are using pip version 20.3.3; however, version 21.1.1 is available.
You should consider upgrading via the '~\Documents\python_projects\lost_sales_validation\venv_lost_sales\Scripts\python.exe -m pip install --upgrade pip' command.

Once I had the most updated version of pip I ran pip install ipywidgets --upgrade.

Upvotes: 1

Related Questions