0

I am on Windows 10 and using python 3.7 through the command prompt.

Whenever I try to import the seaborn library through the command prompt, I get the error:

C:\Python Stuff>python3
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 01:54:44) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import seaborn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\seaborn\__init__.py", line 6, in <module>
    from .rcmod import *
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\seaborn\rcmod.py", line 5, in <module>
    from . import palettes, _orig_rc_params
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\seaborn\palettes.py", line 12, in <module>
    from .utils import desaturate, set_hls_values, get_color_cycle
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\seaborn\utils.py", line 7, in <module>
    from scipy import stats
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\stats\__init__.py", line 384, in <module>
    from .stats import *
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\stats\stats.py", line 179, in <module>
    from scipy.spatial.distance import cdist
  File "C:\Users\berre\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\spatial\__init__.py", line 99, in <module>
    from .qhull import *
ImportError: DLL load failed: The specified module could not be found.

How do I deal with this error? I have tried uninstalling and reinstalling seaborn and its dependencies multiple times, along with using old versions of some of the libraries, but none of that seems to work.

  • 1
    Hi Guy, Welcome to SO. Check out a similar question here: https://stackoverflow.com/questions/43549269/seaborn-importerror-dll-load-failed-the-specified-module-could-not-be-found The answerers suggest you install in using `conda`. – Ramy M. Mousa Jan 09 '20 at 18:35
  • I tried doing what was suggested in the post, but I still got the same error – Guy Berreby Jan 09 '20 at 19:06
  • @GuyBerreby You installed it using Conda? – AMC Jan 09 '20 at 19:32
  • Yes I did, and it still did not work – Guy Berreby Jan 09 '20 at 19:48
  • Try isolating the problem by creating a new virtual environment and then installing `seaborn` in it. See [venv](https://docs.python.org/3/library/venv.html) for example. This worked for me in the past, but with jupyter lab. – K.Cl Jan 10 '20 at 11:39

0 Answers0