python-3.x - 错误:import seaborn- while running the program : from . _ufuncs import * ImportError:DLL加载失败:找不到指定的模块

标签 python-3.x scipy seaborn

我使用的是 Window 10 64 位 Python版本:

Win32 上的 Python 3.6.2(v3.6.2:5fd33b5,2017 年 7 月 8 日,04:57:36)[MSC v.1900 64 位 (AMD64)]

我已经安装了 scipy :


C:\Users\Aswathi>pip install scipy-0.19.1-cp36-cp36m-win_amd64.whl
Requirement already satisfied: scipy==0.19.1 from file:///C:/Users/Aswathi/scipy-0.19.1-cp36-cp36m-win_amd64.whl in c:\users\aswathi\appdata\local\programs\python\python36\lib\site-packages
Requirement already satisfied: numpy>=1.8.2 in c:\users\aswathi\appdata\local\programs\python\python36\lib\site-packages (from scipy==0.19.1)

但是我在 Pycharm 上仍然面临导入 seaborn 的错误

Traceback (most recent call last):
  File "C:/Users/Aswathi/Desktop/Analytics in Python - Edx/game_of_thrones_battle_dataset.py", line 3, in <module>
    import seaborn as sns
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\seaborn\__init__.py", line 6, in <module>
    from .rcmod import *
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\seaborn\rcmod.py", line 8, in <module>
    from . import palettes, _orig_rc_params
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\seaborn\palettes.py", line 12, in <module>
    from .utils import desaturate, set_hls_values, get_color_cycle
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\seaborn\utils.py", line 7, in <module>
    from scipy import stats
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\stats\__init__.py", line 348, in <module>
    from .stats import *
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\stats\stats.py", line 175, in <module>
    import scipy.special as special
  File "C:\Users\Aswathi\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\special\__init__.py", line 640, in <module>
    from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.

最佳答案

我也遇到了同样的问题。在最初寻找 seaborn 答案后,我意识到它与 scipy 问题(ufuncs)有关,它揭示了许多潜在的答案。

这个问题:PYTHON DLL load failed为我解决了问题

我从精彩Unofficial Windows Binaries for Python Extension Packages安装了相关的numpy+mkl

关于python-3.x - 错误:import seaborn- while running the program : from . _ufuncs import * ImportError:DLL加载失败:找不到指定的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46306266/

相关文章:

python - 估计回归中的后验预测

python - 如何在 Python 中将折线图拆分为子图?

python - 读取文件行数的更快方法

Python Scipy 优化 curve_fit

python - 使用 find_peaks_cwt 在噪声数据中查找峰值

matplotlib - 控制seaborn中的网格线间距

python - Seaborn:如何用条形图中X轴上的文本替换索引?

python-3.x - 在训练用于对象分类/检测的神经网络时,我们如何知道模型收敛了?

python - 欧拉计划 #17 的意外结果(Python 3 与 Python 2.7)

multithreading - 线程启动而不调用它的启动方法