Skip to content

plotly express error: cannot import name 'qualitative' #2281

@nhohung

Description

@nhohung

Hi,

I'm trying to create a Choropleth map using plotly express. However when importing plotly express, I got an error:
code:
import plotly.express as px
error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-39-86e89bd44552> in <module>
----> 1 import plotly.express as px

/opt/conda/envs/Python36/lib/python3.6/site-packages/plotly/express/__init__.py in <module>
     13     )
     14 
---> 15 from ._imshow import imshow
     16 from ._chart_types import (  # noqa: F401
     17     scatter,

/opt/conda/envs/Python36/lib/python3.6/site-packages/plotly/express/_imshow.py in <module>
      1 import plotly.graph_objs as go
      2 from _plotly_utils.basevalidators import ColorscaleValidator
----> 3 from ._core import apply_default_cascade
      4 import numpy as np
      5 

/opt/conda/envs/Python36/lib/python3.6/site-packages/plotly/express/_core.py in <module>
      4 
      5 from _plotly_utils.basevalidators import ColorscaleValidator
----> 6 from .colors import qualitative, sequential
      7 import math
      8 import pandas as pd

ImportError: cannot import name 'qualitative'

This issue is different from issue plotly #26793, plotly express #1672 and #123.

I have tried uninstalling plotly, both via pip and conda and reinstalling plotly version 4 as suggested at the main github page, pypi and plotly. However there is no success.

Just to be clear, I run an environment on cloud.IBM.com notebook, python 3.6, built-in plotly 3.6.1.

I have no further clue how to fix this, please provide some help. Any suggestion is appreciated.

Thanks,
Hung

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions