【问题标题】:Seaborn ImportError: DLL load failed: The specified procedure could not be foundSeaborn ImportError: DLL load failed: 找不到指定的程序
【发布时间】:2020-08-02 14:21:28
【问题描述】:

我收到了ImportError: DLL load failed: The specified procedure could not be found。导入模块 seaborn 时。

我的代码是:

import seaborn as sns
sns.set()

输出:

ImportError                               Traceback (most recent call last)
<ipython-input-16-6f477838ac7f> in <module>
----> 1 import seaborn

D:\anaconda3\lib\site-packages\seaborn\__init__.py in <module>
      1 # Capture the original matplotlib rcParams
----> 2 import matplotlib as mpl
      3 _orig_rc_params = mpl.rcParams.copy()
      4 
      5 # Import seaborn objects

D:\anaconda3\lib\site-packages\matplotlib\__init__.py in <module>
    205 
    206 
--> 207 _check_versions()
    208 
    209 

D:\anaconda3\lib\site-packages\matplotlib\__init__.py in _check_versions()
    190     # Quickfix to ensure Microsoft Visual C++ redistributable
    191     # DLLs are loaded before importing kiwisolver
--> 192     from . import ft2font
    193 
    194     for modname, minver in [

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

我已经卸载并重新安装了 seaborn。问题仍然没有解决。我该怎么办?

【问题讨论】:

    标签: python-3.x matplotlib jupyter-notebook seaborn


    【解决方案1】:

    我刚收到你关于 seaborn 和 matplotlib 的问题。您是否尝试执行 matplotlib ?寻找答案,我发现它可能与 matplotlib 实际版本(3.3.1)有关。这是帮助我的 StackOverflow 帖子。

    from matplotlib import ft2font: "ImportError: DLL load failed: The specified procedure could not be found."

    我刚刚从我当前的包中删除/卸载了 matplotlib(我在虚拟环境中工作),并重新安装了以前的版本 (3.0.3)

    【讨论】:

      【解决方案2】:

      我最近在 jupyter 实验室导入 seaborn 时遇到了同样的问题。

      我使用 pip 卸载了 seaborn:

      pip uninstall seaborn

      然后使用 pip 再次安装:

      pip install seaborn

      这在我的情况下有效。

      只是在旁注中,我还使用更新了整个 conda 环境 conda update --all。但这在这种情况下可能没有影响。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-04-16
        • 1970-01-01
        • 2016-08-19
        • 2017-12-18
        • 1970-01-01
        • 1970-01-01
        • 2020-12-04
        • 1970-01-01
        相关资源
        最近更新 更多