首页 > 解决方案 > Visual Studio Code can import only modules installed in python, but not in a virtual environment

问题描述

This is the imports section of a python script:

enter image description here

As you can see, some of the imports are marked as unresolved by VSC. The only way to avoid this is by installing such modules in general python.

How can I instruct VSC to use a virtual environment where all these modules are already installed?

标签: pythonvisual-studio-codepylance

解决方案


推荐阅读