【Panda3D 】在Windows中安装Panda3D

如果您以前已经安装了Panda,您应该在安装新版本之前卸载它。一旦您的机器清除了所有先前版本的Panda3D,您应该从下载页面下载windows安装程序。运行安装程序,并遵循提示:

 

安装了Panda之后,您应该运行示例程序来验证安装是否正确。在Windows下,运行示例程序最简单的方法是在开始菜单中找到它:【Panda3D 】在Windows中安装Panda3D

 

但是您也可以使用命令提示符手动运行示例程序。
打开命令提示符,然后将目录更改为安装Panda的位置。然后,切换到samples子目录。在那里,你会发现大量的样品:

 

将目录更改为示例程序目录之一,然后使用Python运行有问题的示例程序:
如果测试程序不运行,那么通常情况下,您需要更新您的视频驱动程序。如果您想确切地知道为什么一个程序没有运行,您可能需要使用命令提示符来运行它——这将使您能够看到错误消息。

What to do if you see the Error Message:

:display(error): The application requested hardware acceleration, but your OpenGL
:display(error): driver, GDI Generic, only supports software rendering.
:display(error): You need to install a hardware-accelerated OpenGL driver, or,
:display(error): if you actually *want* to use a software renderer, then
:display(error): alter the hardware/software configuration in your Config.prc file.
:display(error): Window wouldn't open; abandoning window.

This error is fairly self-explanatory: it means your video drivers are inadequate. Obtain better drivers.

What to do if you see the Error Message:

python is not a recognized internal command

此错误消息意味着命令提示符无法定位python。通常,在panda安装过程中,PATH环境变量被配置为指示python的位置。然而,一些pc有不寻常的安全配置,阻止安装程序修改路径。这可能导致上面显示的错误消息。

为了解决这个问题,可能需要手动修改路径。点击桌面上的“我的电脑”图标,选择“属性”。选择“高级”选项卡。点击“环境变量”按钮:

 

如果您具有访问PC的管理员权限,请在系统变量下的列表中选择路径线,否则,请在个人环境变量列表中选择路径线。

 

现在双击路径行。将打开一个小窗口,其中包含由分号分隔的一系列目录。将Panda3D的bin和python目录添加到路径的末尾。

 

【Panda3D 】在Windows中安装Panda3D可能需要注销和重新登录才能获得更新的设置。