0

I'm using conda environment in vscode. TensorFlow is installed and can be used properly. But Pylance show [reportMissingImports] in some of imported submodules or classes, etc. For example, refer to the screenshot at https://i.sstatic.net/VcVOS.png

The squiggled submodules couldn't be resolved by Pylance, and the intellisense and autocompletion are invalid, which is very disruptive to coding. In contrast, the unsquiggled modules, just like tf and keras in the screenshot, work well.

Version Lists
python 3.10.13
TensorFlow 2.11.1
vscode 1.84.2
Pylance 2023.11.10

I have confirmed that I choose the right Python interpreter. Actually, TensorFlow works well while running my codes. I notice that when I type import tensorflow.python. the autocompletion only shows keras submodule. Please refer to the screenshot at https://i.sstatic.net/uqRn5.png

Is Pylance bugged, or should anything else be set to ensure Pylance works as expected?

1 Answer 1

1

Finally, I found the resolution according to https://github.com/microsoft/pylance-release/issues/734. As the screenshot https://i.sstatic.net/yksy2.png, it does work well, as my expect.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.