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
my code:
from direct.showbase.ShowBase import ShowBase
class APAT58(ShowBase):
def __init__(self):
ShowBase.__init__(self)
app = APAT58()
app.run()
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.
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.