question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import Error: DLL load failed

See original GitHub issue

When trying to import seaborn on windows (x64) the following error is raised:

ImportError                               Traceback (most recent call last)
<ipython-input-1-ed9806ce3570> in <module>()
----> 1 import seaborn as sns

C:\Users\kasus\Anaconda3\lib\site-packages\seaborn\__init__.py in <module>()
----> 1 from .rcmod import *
      2 from .utils import *
      3 from .palettes import *
      4 from .linearmodels import *
      5 from .categorical import *

C:\Users\kasus\Anaconda3\lib\site-packages\seaborn\rcmod.py in <module>()
      6 import matplotlib as mpl
      7 
----> 8 from . import palettes
      9 
     10 mpl_ge_150 = LooseVersion(mpl.__version__) >= '1.5.0'

C:\Users\kasus\Anaconda3\lib\site-packages\seaborn\palettes.py in <module>()
     10 from .external.six.moves import range
     11 
---> 12 from .utils import desaturate, set_hls_values, get_color_cycle
     13 from .xkcd_rgb import xkcd_rgb
     14 from .crayons import crayons

C:\Users\kasus\Anaconda3\lib\site-packages\seaborn\utils.py in <module>()
      6 
      7 import numpy as np
----> 8 from scipy import stats
      9 import pandas as pd
     10 import matplotlib as mpl

C:\Users\kasus\Anaconda3\lib\site-packages\scipy\stats\__init__.py in <module>()
    336 from __future__ import division, print_function, absolute_import
    337 
--> 338 from .stats import *
    339 from .distributions import *
    340 from .morestats import *

C:\Users\kasus\Anaconda3\lib\site-packages\scipy\stats\stats.py in <module>()
    178 from scipy._lib.six import callable, string_types
    179 from numpy import array, asarray, ma, zeros
--> 180 import scipy.special as special
    181 import scipy.linalg as linalg
    182 import numpy as np

C:\Users\kasus\Anaconda3\lib\site-packages\scipy\special\__init__.py in <module>()
    625 from __future__ import division, print_function, absolute_import
    626 
--> 627 from ._ufuncs import *
    628 
    629 from .basic import *

ImportError: DLL load failed: The specified module could not be found.

These are the current verions of my conda environment:

conda: 4.0.6.
numpy: 1.10.4
pandas: 0.18.1
scipy: 0.17.1
seaborn: 0.7.0

Do you know how to fix this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Irene-GMcommented, Apr 4, 2018

I had the same problem trying to run seaborn within a conda environment running with Python 3.4.5. In my case the solution was downgrading scipy (and dependencies sklearn, mkl, and numpy) from 0.19.1 to 0.17.1. I also tried first downgrading it to 0.18.1, but apparently the bad interaction with seaborn appears in version 0.18.1 already. So by doing this, i can import seaborn without that error message. I hope someone has some time to take a look to this and provide some more info 😃

1reaction
mwaskomcommented, May 15, 2016

Yep, looks like a bad scipy installation. I’d ask over there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve "ImportError: DLL load failed:" on Python?
I have managed to resolve the problem by reinstalling Python. First, I have uninstalled Python (like any other program in Windows). Then I...
Read more >
How to Fix Python ImportError: Dll Load Failed Error
In most cases, the "ImportError: Dll Load Failed: The specified module could not be found" error will occur when you import Python libraries ......
Read more >
Error importing Python module: DLL load failed - PyXLL
When a Python extension module is compiled it may depend on some additional libraries called DLLs, or Dynamic Link Libraries. If these DLLs...
Read more >
How to fix “ImportError: DLL load failed: The specified module ...
To fix the "ImportError: DLL load failed: The specified module could not be found" error in Python 3, you will need to ensure...
Read more >
ImportError: DLL load failed while importing librdata: Can't find ...
The problem is that depending how you install Python, the folder structure of where the packages get installed looks different. For instance, if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found