[英]Import Manim could not be resolved Pylance
當我嘗試在 VsCode 上執行此代碼時,它給了我這個錯誤: Import Manim could not besolved Pylance。 我正在使用 Python 3.10.4 和 Manim 的最新版本
from manim import *
class trabalho(Scene):
def construct(self):
plane = NumberPlane()
self.add(plane)
請確保您當前使用的是正確的工作環境(環境設置請參考本文檔)。
並且選擇了正確的python解釋器,您可以通過點擊右下角狀態欄中顯示的當前解釋器來更改它,
或者使用ctrl+shift+p進入Python:選擇Interpreter。
另一種方法:在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:\\...\\...\\...\\..."
]
希望這可以幫助你
在 VsCode 中試試這個:(1) ctrl-shift-p (2) 在搜索框中,輸入 python 然后選擇 Python:選擇解釋器 (3) 選擇 Python 3.10.4 或任何一個匹配你的版本
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.