如何修复 ModuleNotFoundError: No module named 'dateutil'
问题:
你想在 Python 中使用 dateutil 库,但当你尝试导入它时,你看到类似这样的异常:
error_message.txt
Traceback (most recent call last):
File "my.py", line 11, in <module>
import dateutil as dl
ModuleNotFoundError: No module named 'dateutil'当你尝试使用例如 pip install dateutil 安装它时,你看到此错误消息:
error_message.txt
Collecting dateutil
Could not find a version that satisfies the requirement dateutil (from versions: )
No matching distribution found for dateutil解决方案
该包名为 python-dateutil。使用以下命令安装
pip_install_command.sh
pip install python-dateutilCheck out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow