You need to run the python files with ppython, instead of clicking on them directly. Try opening a command shell (pick Run … and type “cmd”), changing to the directory in which you have stored NAME.py:
You’re not the first one to have this trouble, it took me ages to figure out how to do the first tutorial. The people here are really fantastic though, and they helped me to work it out.
I figure that the least I can do, is try to help out a fellow newbie . Anyway, a while ago, I wrote a sort of ‘mini tutorial’ to help out Gue (you can find it in his ‘New to programming’ thread).
I’ll post it again for you, with a couple of revisions and edits. This is supposed to be read as a supplement to the first tutorial ( A Panda “Hello World”) found in the manual. Here goes:
Panda3D isn’t like most programs that you’re probably used to. You can’t start it through your computer’s START menu, or by double clicking a shortcut icon on your desktop. Instead, you must write a script in a text editor (such as Notepad or PyPE) that contains instructions that tell Panda3D to start. This script must then be run by using your computer’s ‘Command Prompt’.
Create A Script
Before you can start Panda3D, you first need to create a script. Open â€˜Notepadâ€™ or ‘PyPE’’ and type the following:
You must now save this script with the .py extension. If you’re using Notepad, then enclose the entire File name in quotes â€œ __â€
It sounds like you need some more practice with the command prompt before you continue with Panda. Try searching the internet for help with the command prompt. Also, If you have never used python before, I would suggest buying a book on python and visiting python.org to learn more about the python programming language.
For the directory, make sure you have typed the command:
after you have opened the command prompt.
cd stands for “change directory”. For a windows user, it means go to the folder specified.
In this example “MyStuff” is the directory (windows folder) your command prompt will read from after you hit enter. This assumes that C:\Panda3D-1.0.4\samples\MyStuff\ has already been created.
Try going through the steps Witchetty posted again and be patient. If it gives you an error, compare what you did with the steps given, and try to see where you went wrong. Then try it again.
Have had that problem also on my own… installed Panda3D 1.0.5 on Ubuntu (Debian based so I took the debian package) and all I get when I start a program that DOES work on another machine is the error said above…
Started with “ppython /home/myusername/panda-workdir/appname.py”