Pylance fails to resolve import when notebook is connected to a remote server #14025
Replies: 4 comments 1 reply
-
are you connected to a local or remote kernel? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately this is not supported today, please create an issue on Pylance repo. |
Beta Was this translation helpful? Give feedback.
-
Currently this does work in my testing, but only if I close and re-open the notebook after selecting a kernel. It seems that a notebook must have a kernel selected before it is opened for Pylance to evaluate those imports properly. I know this is just a work-around, but I hope it helps someone else. |
Beta Was this translation helpful? Give feedback.
-
Same problem occurred to me . When opening an already saved .ipnb Pylance works just fine but when I create a new one it doesn't seem to work . To fix this I run a new Jupiter file I want to work with save it even if it's empty , when I reopen it again then Pylance works finally . |
Beta Was this translation helpful? Give feedback.
-
Pylance works correctly when notebook is connected to a local kernel. But when I start a jupyter server with the same kernel, and connect notebook to this server, Pylance reports "Import could not be resolved from source" on some packages, such as pandas and torch. Code execution always works well. Only something wrong with the performance of Pylance in notebook. I wonder whether this is an unsupported feature, or I need to change some setting to fix it.
Beta Was this translation helpful? Give feedback.
All reactions