hello, I am a beginner in Panda3D and I wanted to make a small test before doing anything else, I wrote the code for opening a window in windows then to get this error:
““import “direct.showbase.ShowBase” could not be resolved. pylance(report missing imports)””
i was using Visual Studio Code, not sure if it makes a difference
from direct.showbase.ShowBase import ShowBase
app = APAT58()
(APAT58 is just a temporary folder name)
However, the problem is that python, which uses
Visual Studio Code Pylance, does not know anything about the direct folder.
For this to work, you need to install Panda3D in the copy of the python interpreter that is supplied or linked to the
Visual Studio Code. You can use the pip command.
C:\Users\name\AppData\Local\Programs\Python\Python311\python.exe -m pip install panda3d==1.10.13
This is for example. You need to find out where your python is located. This is usually linked via a path variable. The problem is that when you install the Panda3D SDK, you usually overwrite this parameter, which causes this problem.