Dash Import Error: DLL Load failed

Hello,

I am having a problem when importing dash.
When I try to import dash in the command prompt I get the following error:

import dash
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\M******\AppData\Roaming\Python\Python37\site-packages\dash_init_.py”, line 1, in
from .dash import Dash, no_update # noqa: F401
File “C:\Users\M*****\AppData\Roaming\Python\Python37\site-packages\dash\dash.py”, line 19, in
from flask_compress import Compress
File “C:\Users\M******\AppData\Roaming\Python\Python37\site-packages\flask_compress.py”, line 10, in
import brotli
File “C:\Users\M******\AppData\Roaming\Python\Python37\site-packages\brotli.py”, line 8, in
import _brotli
ImportError: DLL load failed: The specified module could not be found.

However, if I import matplotlib first I no longer get the error:

Type “help”, “copyright”, “credits” or “license” for more information.

import dash
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\M******\AppData\Roaming\Python\Python37\site-packages\dash_init_.py”, line 1, in
from .dash import Dash, no_update # noqa: F401
File “C:\Users\MAppData\Roaming\Python\Python37\site-packages\dash\dash.py", line 19, in
from flask_compress import Compress
File "C:\Users\M
*\AppData\Roaming\Python\Python37\site-packages\flask_compress.py”, line 10, in
import brotli
File “C:\Users\M*******\AppData\Roaming\Python\Python37\site-packages\brotli.py”, line 8, in
import _brotli
ImportError: DLL load failed: The specified module could not be found.
import matplotlib
import dash

Any ideas how to fix this problem?

Thanks

I to am experiencing this issue. Have you had any success in resolving it?

Hi I found a bit of a basic workaround that is you import matplotlib and then dash it works fine- hope this helps you too.

I found that my error was that I did not have the Visual C++ installed for my machine. Once I installed that, I got it to work.