Search code examples
pythonimportplotly-dashsystemexit

Can't import dash_core_components


I installed dash on ubuntu 18.04: pip3 install dash. The version of dash says 1.16.0

Then I have a test program, test.py, and I get the following error. What is wrong?

import plotly
import dash
import dash_core_components as dcc   <<<<<<<<<<<<< error here:
   Exception has occurred:SystemExit
    1
      File "..../test.py, line 3, in <module>
        import dash_core_components as dcc
      File "..../test.py, line 2, in <module>
       import dash

Solution

  • This sometimes happens with a file in the directory called test.py. Removing that file should resolve the error.