Put simply, I am not new to programming. I am not going to sit here and argue that I didn’t install it correctly, or that I’m using the right version of Python, or anything like that. The steps that I have taken are as follows:
- Installed Panda3D
- Opened up the Hello World Tutorial: panda3d.org/manual/index.ph … d_Tutorial
- Used both the Python:
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
app = MyApp()
app.run()
and C++:
#include "pandaFramework.h"
#include "pandaSystem.h"
int main(int argc, char *argv[]) {
//open a new window framework
PandaFramework framework;
framework.open_framework(argc, argv);
//set the window title to My Panda3D Window
framework.set_window_title("My Panda3D Window");
//open the window
WindowFramework *window = framework.open_window();
//here is room for your own code
//do the main loop, equal to run() in python
framework.main_loop();
//close the window framework
framework.close_framework();
return (0);
}
code exactly as provided in the tutorial, and I get nothing.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Alexander>ppython C:\Users\Alexander\Desktop\panda3d.py
Traceback (most recent call last):
File "C:\Users\Alexander\Desktop\panda3d.py", line 1, in <module>
from direct.showbase.ShowBase import ShowBase
File "C:\Panda3D-1.8.1\direct\showbase\ShowBase.py", line 33, in <module>
import Loader
File "C:\Panda3D-1.8.1\direct\showbase\Loader.py", line 5, in <module>
from panda3d.core import *
File "C:\Users\Alexander\Desktop\panda3d.py", line 1, in <module>
from direct.showbase.ShowBase import ShowBase
ImportError: cannot import name ShowBase
C:\Users\Alexander>
So, no. It does not work right out of the box. Does anyone have any idea what’s going on here?