英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论