python - Pylint:'无法导入'pathlib'(导入错误)'
问题描述
为什么 pylint 说它可以导入内置模块?我的代码执行没有错误,在 python.exe 中我可以加载任何内置或 pip 安装的模块。
PS F:\z0py> python.exe -m pylint .\jake9wi_file_hashing\
************* Module jake9wi_file_hashing.funcs
jake9wi_file_hashing\funcs.py:3:0: E0401: Unable to import 'pathlib' (import-error)
jake9wi_file_hashing\funcs.py:4:0: E0401: Unable to import 'hashlib' (import-error)
jake9wi_file_hashing\funcs.py:5:0: E0401: Unable to import 'json' (import-error)
************* Module jake9wi_file_hashing.__main__
jake9wi_file_hashing\__main__.py:2:0: E0401: Unable to import 'os' (import-error)
jake9wi_file_hashing\__main__.py:4:0: E0401: Unable to import 'pathlib' (import-error)
------------------------------------------------------------------
Your code has been rated at 7.13/10 (previous run: 7.05/10, +0.08)
解决方案
推荐阅读
- spring - 更新到最新版本后替换 @EnableSwagger2
- java - 如何让 JFrame 在 10 秒后自行关闭?
- javascript - PHP 和 JS 以不同的方式转换相同的日期
- python - 如何在python中找到最接近角落的图像中的哪个坐标?
- java - 如何使用 docker & IntelliJ 作为文本编辑器在本地部署 Java webapp?
- react-native - 有没有办法在 React Native 中连接到一个简单的 TCP 套接字?
- sql - 有谁知道如何在 .ASP 经典页面中显示存储在 SQL 表中的 TIFF 图像?
- django - 如何在 Django 的 Web 应用程序中按日期对帖子进行排序?
- python - 比较来自 CSV 的日期的问题
- flutter - Flutter Provider:正确调度动作的最佳方式是什么?