我已經下載了一個 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
}]
uj5u.com熱心網友回復:
對于 xlrd python 模塊,您需要 2 個庫。
- 點安裝 jinja2
- 點安裝 xlrd
這應該可以解決您的問題
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/485162.html
上一篇:為什么我不能在VisualStudioCode的return陳述句中使用EXIT_SUCCESS而不是0?
下一篇:vscode中的負前瞻
