Part 1:什么是Panda3D [原始網站] [中文版本]
Part 2:注意事項
Panda3D的版本必須與Python相匹配
Part 3:使用已安裝的Python
將‘C:\Panda3D-1.8.1\python'中的panda.pth復制到‘C:Python27’下。
打開panda.pth,刪去原有內容,添加一下兩行:
C:\Panda3D-1.8.1
C:\Panda3D-1.8.1\bin
這樣Python就能訪問Panda3D的模塊。具體的Python與Panda3D路徑按照自己的情況調整。
問題描述:使用IDLE運行Panda3D App
from direct.showbase.ShowBase import ShowBase class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) app = MyApp() app.run()
結果出現下列問題
“No module named direct.showbase.ShowBase”
這正是因為當前的Python不能識別Panda3D路徑所致,可以按照上述Part 3部分提供的方法解決。
注:
記得刪去Path中 Panda3D 下的python路徑。