我已经下载了一个 pip 包“xlrd”来读取一个 excel 文件。当我尝试运行该模块时,程序显示我尚未下载该 pip。我一直无法找到答案,因为我不知道要问什么问题。我怎样才能解决这个问题?
下载 pip 时的消息:“要求已经满足:c:\users\thecodeadd\appdata\local\programs\python\python310\lib\site-packages (2.0.1) 中的 xlrd”它在“问题”中显示的内容程序:
[{
"resource": "/c:/Users/thecodeadd/Documents/Stuff/Program/Programs/Python/Trialxlrd.py",
"owner": "_generated_diagnostic_collection_name_#0",
"code": {
"value": "reportMissingImports",
"target": {
"$mid": 1,
"external": "https://github.com/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md#diagnostic-severity-rules",
"path": "/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md",
"scheme": "https",
"authority": "github.com",
"fragment": "diagnostic-severity-rules"
}
},
"severity": 4,
"message": "Import \"xlrd\" could not be resolved",
"source": "Pylance",
"startLineNumber": 1,
"startColumn": 8,
"endLineNumber": 1,
"endColumn": 12
}]
对于 xlrd python 模块,您需要 2 个库。
这应该可以解决您的问题
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句