Closed illidan-liu closed 2 years ago
import chinese_calendar
Import "chinese_calendar" could not be resolved
VScode 1.61.2 Pylance v2021.11.0 Python 3.8.8 pip 21.0.1 chinesecalendar 1.6.0
{ "resource": "/d:/xxx/Code/backtester/backtest.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 \"chinese_calendar\" could not be resolved", "source": "Pylance", "startLineNumber": 2, "startColumn": 8, "endLineNumber": 2, "endColumn": 24 }
After restarting VSCode, there is no error message...
If you installed the package in a virtual environment outside of your workspace, it's likely #923.
the code
import chinese_calendar
the error message
Import "chinese_calendar" could not be resolved
environment
VScode 1.61.2 Pylance v2021.11.0 Python 3.8.8 pip 21.0.1 chinesecalendar 1.6.0
details