Matplotlib kiwisolver import problem _cext

huangapple go评论61阅读模式
英文:

Matplotlib kiwisolver import problem _cext

问题

抱歉,你提供的文本已经是代码部分,无需翻译。如果你需要任何帮助或解释,请随时提问。

英文:

I'm having the followoing error when running my script. I have tried uninstalling matplotlib and reinstalling it and the same for kiwisolver. I'm using python 3.11.2

import matplotlib.pyplot as plt
  File "c:\Users\XXXX\Downloads\XXXX\XXXX\.venv\Lib\site-packages\matplotlib\__init__.py", line 246, in <module>
    _check_versions()
  File "c:\Users\XXXX\Downloads\XXXXX\XXXX\.venv\Lib\site-packages\matplotlib\__init__.py", line 240, in _check_versions
    module = importlib.import_module(modname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\XXX\Downloads\XXXX\XXXX\.venv\Lib\site-packages\kiwisolver\__init__.py", line 8, in <module>
    from ._cext import (
ImportError: DLL load failed while importing _cext: The specified module could not be found.

答案1

得分: 1

打开 Windows PowerShell 并执行以下命令进行安装:

pip install msvc-runtime
英文:

I have found the solution open the windows powershell and installing this:

pip install msvc-runtime

答案2

得分: 1

我发现安装 Microsoft Visual C++ Redistributable 可以解决这个问题。

你可以从 https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 下载它。

英文:

I found that installing Microsoft Visual C++ Redistributable fixes the problem.

You can download it from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

huangapple
  • 本文由 发表于 2023年3月31日 23:44:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75900418.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定