You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Matplotlib提示dateutil版本不兼容但实际已安装符合要求版本的问题求助

Matplotlib提示dateutil版本不兼容但实际已安装符合要求版本的问题求助

各位好,我最近在运行Python程序时碰到了一个非常费解的问题,想请大家帮忙看看:

我已经安装了matplotlib,但是运行程序时却抛出了版本不兼容的错误,具体报错信息如下:

Traceback (most recent call last):
  File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\TEST\mtsa\plot_metrics_mtsa.py", line 2, in <module>
    from matplotlib import pyplot
  File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\venv\lib\site-packages\matplotlib\__init__.py", line 263, in <module>
    _check_versions()
  File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\venv\lib\site-packages\matplotlib\__init__.py", line 259, in _check_versions
    raise ImportError(f"Matplotlib requires {modname}>={minver}; "
ImportError: Matplotlib requires dateutil>=2.7; you have 2.2

可我检查本地安装的python-dateutil版本,明明是满足要求的2.9.0.post0:

C:\Users\kystepa2>pip show python-dateutil
Name: python-dateutil
Version: 2.9.0.post0

我已经尝试过以下几种解决办法,但问题还是没有得到解决:

  • 重新安装matplotlib和python-dateutil
  • 尝试直接安装dateutil包(而非python-dateutil),但安装失败,报错信息如下:
C:\Users\kystepa2>pip install dateutil
ERROR: Could not find a version that satisfies the requirement dateutil (from versions: none)
ERROR: No matching distribution found for dateutil

有没有朋友遇到过类似的情况?或者能指点我接下来该怎么排查和解决这个问题?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.07 12:42:56