Jupyter Notebooks imports not being resolved
Environment data
- Pylance version: v2024.8.1
- OS and version: Pop_OS! 6.8 LTS
- Python version: 3.10
- Poetry version: 1.35.0
Code Snippet
python
import pandas as pd
from pydantic import BaseModel, Field
from langchain.output_parsers import PydanticOutputParser
from langchain_core.prompts import PromptTemplate
from langchain.schema import HumanMessage
from langchain_openai import ChatOpenAI
import matplotlib.pyplot as plt
import numpy as np
from typing import List
import nest_asyncio
import aiohttp
import asyncio
Repro Steps
- Import any package or module that is installed via Poetry
Expected behavior
No import errors
Actual behavior
Import "numpy" could not be resolvedPylance[reportMissingImports](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportMissingImports)
Logs
XXX
Thanks for the issue. Which kernel have you selected? I assume it's the one matching your poetry environment.
Does the problem go away if you save the notebook and reload the VS code window? If so, then this should be a dupe of https://github.com/microsoft/vscode-jupyter/issues/15965
Yes it does go away whenI save and reopen the window. Must be a dupe then :+1:
Using my local poetry .venv kernel
Closing via https://github.com/microsoft/vscode-jupyter/pull/15967