当我试图在VsCode上执行这段代码时,它给了我一个错误: Import无法解析Pylance。我正在使用Python3.10.4和Manim的最后一个版本
from manim import *
class trabalho(Scene):
def construct(self):
plane = NumberPlane()
self.add(plane)发布于 2022-06-06 05:40:13
请确保您当前正在使用正确的工作环境(有关设置环境,请参阅本文件 )。
并且选择了正确的python解释器,您可以通过单击显示在右下角状态栏中的当前解释器来更改它,

或者使用ctrl+shift+p输入Python:选择解释器。

另一种方法是:将路径添加到setting.json中的模块。例如:
"python.analysis.extraPaths":[
// The folder path where the custom module is located, and multiple paths can be added (the following is just an example)
"E:\\myfolder\\homework\\one\\Person_reID_baseline_pytorch-master" ,
"E:\\...\\...\\...\\..."
]希望这对你有帮助
发布于 2022-06-03 20:02:57
在VsCode:(1) ctrl-shift-p (2)的搜索框中,键入python,然后选择Python:选择解释器(3)选择Python3.10.4或任何一个匹配您的verion
https://stackoverflow.com/questions/72477708
复制相似问题