Build Crashes Immediately

I am new to Panda3D, and I am trying to get a simple program to build. I have tried ‘python setup.py build_apps’ and ‘python setup.py bdist_apps’. Neither has worked. The .exe crashes immediately. I am using the setuptools example from the website. I have included build output, the setup.py file, the script files, the config.prc file, the log messages, and the error I get when I run the program. I have used PyInstaller to generate an .exe file, and it crashes and gives the same error. I have tried to move the config files, I have deleted and replaced them, I have also tried to rebuild the program with the files present and removed. I still get the same error. I don’t know what I’m doing wrong. Any help would be appreciated.

Here is the build output
C:\Panda3D-1.10.7-x64\mystuff>python setup.py build_apps
running build_apps
Building platforms: manylinux1_x86_64,macosx_10_6_x86_64,win_amd64
Gathering wheels for platform: manylinux1_x86_64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d
  Using cached https://buildbot.panda3d.org/downloads/v1.10.7/opt/panda3d-1.10.7%2Bopt-cp37-cp37m-manylinux1_x86_64.whl (50.9 MB)
Saved c:\panda3d-1.10.7-x64\mystuff\build\__whl_cache__\manylinux1_x86_64_cp37m\panda3d-1.10.7+opt-cp37-cp37m-manylinux1_x86_64.whl
Successfully downloaded panda3d
Building runtime for platform: manylinux1_x86_64
There are some missing modules: ['__builtin__']
Copying game files for platform: manylinux1_x86_64
Gathering wheels for platform: macosx_10_6_x86_64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d
  Using cached https://buildbot.panda3d.org/downloads/v1.10.7/opt/panda3d-1.10.7%2Bopt-cp37-cp37m-macosx_10_6_x86_64.whl (58.2 MB)
Saved c:\panda3d-1.10.7-x64\mystuff\build\__whl_cache__\macosx_10_6_x86_64_cp37m\panda3d-1.10.7+opt-cp37-cp37m-macosx_10_6_x86_64.whl
Successfully downloaded panda3d
Building runtime for platform: macosx_10_6_x86_64
Copying game files for platform: macosx_10_6_x86_64
Gathering wheels for platform: win_amd64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d
  Using cached https://buildbot.panda3d.org/downloads/v1.10.7/opt/panda3d-1.10.7%2Bopt-cp37-cp37m-win_amd64.whl (63.2 MB)
Saved c:\panda3d-1.10.7-x64\mystuff\build\__whl_cache__\win_amd64_cp37m\panda3d-1.10.7+opt-cp37-cp37m-win_amd64.whl
Successfully downloaded panda3d
Building runtime for platform: win_amd64
There are some missing modules: ['_posixsubprocess']
Copying game files for platform: win_amd64
Here is the setup.py
import setuptools

setup(
    name="Hello World",
    options = {
        'build_apps': {
            'console_apps': {'hello_world': 'main.py'},
        }
    }
)
Here is the main.py script
from math import pi, sin, cos
from direct.showbase.ShowBase import ShowBase
from direct.showbase import DirectObject
from direct.task import Task
import mainRun
class MyApp(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)
        testPrint = self.taskMgr.add(mainRun.testPrint, 'testPrint', extraArgs=[], appendTask=True)
app = MyApp()
app.run()
Here is the mainRun.py script
from direct.task import Task
def testPrint(task):
    print('running')
    return Task.cont
Here is the config.prc
###########################################################
###                                                     ###
### Panda3D Configuration File -  User-Editable Portion ###
###                                                     ###
###########################################################

# Uncomment one of the following lines to choose whether you should
# run using OpenGL, DirectX or TinyPanda (software) rendering.
# There can only be one load-display line, but you can use
# multiple aux-display lines to specify fallback modules.
# When the module indicated by load-display fails, it will fall
# back to the next display module indicated by aux-display,
# when that fails, the next aux-display line, and so on.

load-display pandagl
#load-display pandadx9
#load-display p3tinydisplay

# These control the placement and size of the default rendering window.
# A value of -2 for the origin means to center it on the screen,
# while -1 lets the window manager choose the position.

win-origin -2 -2
win-size 800 600

# Uncomment this line if you want to run Panda fullscreen instead of
# in a window.

fullscreen #f

# The framebuffer-hardware flag forces it to use an accelerated driver.
# The framebuffer-software flag forces it to use a software renderer.
# If you set both to false, it will use whatever's available.

framebuffer-hardware #t
framebuffer-software #f

# These set the minimum requirements for the framebuffer.
# A value of 1 means: get as many bits as possible,
# consistent with the other framebuffer requirements.

depth-bits 1
color-bits 1 1 1
alpha-bits 0
stencil-bits 0
multisamples 0

# These control the amount of output Panda gives for some various
# categories.  The severity levels, in order, are "spam", "debug",
# "info", "warning", and "error"; the default is "info".  Uncomment
# one (or define a new one for the particular category you wish to
# change) to control this output.

#notify-level warning
#default-directnotify-level warning
notify-level spam
default-directnotify-level info
notify-output mygame-log.txt

# These specify where model files may be loaded from.  You probably
# want to set this to a sensible path for yourself.  $THIS_PRC_DIR is
# a special variable that indicates the same directory as this
# particular Config.prc file.

model-path    $MAIN_DIR
model-path    $THIS_PRC_DIR/..
model-path    $THIS_PRC_DIR/../models

# This enable the automatic creation of a TK window when running
# Direct.

want-directtools  #f
want-tk           #f

# Enable/disable performance profiling tool and frame-rate meter

want-pstats            #f
show-frame-rate-meter  #f

# Enable audio using the OpenAL audio library by default:

audio-library-name p3openal_audio

# Enable the use of the new movietexture class.

use-movietexture #t

# The new version of panda supports hardware vertex animation, but it's not quite ready

hardware-animated-vertices #f

# Enable the model-cache, but only for models, not textures.

model-cache-dir $USER_APPDATA/Panda3D-1.10
model-cache-textures #f

# This option specifies the default profiles for Cg shaders.
# Setting it to #t makes them arbvp1 and arbfp1, since these
# seem to be most reliable. Setting it to #f makes Panda use
# the latest profile available.

basic-shaders-only #f
Here are my log messages
:express(debug): mount / under /
:movies(debug): Registered audio type with extension flac
:movies(debug): Registered audio type with extension wav
:movies(debug): Registered audio type with extension wave
:movies(debug): Registered audio type with extension opus
:movies(debug): Registered audio type with extension ogg
:movies(debug): Registered audio type with extension oga
:pnmimage(debug): Registering image type SGI RGB
:pnmimage(debug): Registering image type Targa
:pnmimage(debug): Registering image type Raw binary RGB
:pnmimage(debug): Registering image type SoftImage
:pnmimage(debug): Registering image type Windows BMP
:pnmimage(debug): Registering image type NetPBM-style PBM/PGM/PPM/PNM
:pnmimage(debug): Registering image type Portable Float Map
:pnmimage(debug): Registering image type JPEG
:pnmimage:png(debug): PNG version 10628
:pnmimage(debug): Registering image type PNG
:pnmimage:tiff(debug): LIBTIFF, Version 4.0.6
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
:pnmimage(debug): Registering image type TIFF
:pnmimage(debug): Registering image type OpenEXR
:pnmimage(debug): Registering image type stb_image
:util(spam): Registering button lstick
:util(spam): Registering button rstick
:util(spam): Registering button lshoulder
:util(spam): Registering button rshoulder
:util(spam): Registering button ltrigger
:util(spam): Registering button rtrigger
:util(spam): Registering button lgrip
:util(spam): Registering button rgrip
:util(spam): Registering button dpad_left
:util(spam): Registering button dpad_right
:util(spam): Registering button dpad_up
:util(spam): Registering button dpad_down
:util(spam): Registering button back
:util(spam): Registering button guide
:util(spam): Registering button start
:util(spam): Registering button next
:util(spam): Registering button previous
:util(spam): Registering button face_a
:util(spam): Registering button face_b
:util(spam): Registering button face_c
:util(spam): Registering button face_x
:util(spam): Registering button face_y
:util(spam): Registering button face_z
:util(spam): Registering button face_1
:util(spam): Registering button face_2
:util(spam): Registering button trigger
:util(spam): Registering button hat_up
:util(spam): Registering button hat_down
:util(spam): Registering button hat_left
:util(spam): Registering button hat_right
:util(spam): Registering button space
:util(spam): Registering button backspace
:util(spam): Registering button tab
:util(spam): Registering button enter
:util(spam): Registering button escape
:util(spam): Registering button delete
:util(spam): Registering button f1
:util(spam): Registering button f2
:util(spam): Registering button f3
:util(spam): Registering button f4
:util(spam): Registering button f5
:util(spam): Registering button f6
:util(spam): Registering button f7
:util(spam): Registering button f8
:util(spam): Registering button f9
:util(spam): Registering button f10
:util(spam): Registering button f11
:util(spam): Registering button f12
:util(spam): Registering button f13
:util(spam): Registering button f14
:util(spam): Registering button f15
:util(spam): Registering button f16
:util(spam): Registering button arrow_left
:util(spam): Registering button arrow_right
:util(spam): Registering button arrow_up
:util(spam): Registering button arrow_down
:util(spam): Registering button page_up
:util(spam): Registering button page_down
:util(spam): Registering button home
:util(spam): Registering button end
:util(spam): Registering button insert
:util(spam): Registering button help
:util(spam): Registering button shift
:util(spam): Registering button control
:util(spam): Registering button alt
:util(spam): Registering button meta
:util(spam): Registering button caps_lock
:util(spam): Registering button shift_lock
:util(spam): Registering button num_lock
:util(spam): Registering button scroll_lock
:util(spam): Registering button print_screen
:util(spam): Registering button pause
:util(spam): Registering button menu
:util(spam): Registering button lshift
:util(spam): Registering button rshift
:util(spam): Registering button lcontrol
:util(spam): Registering button rcontrol
:util(spam): Registering button lalt
:util(spam): Registering button ralt
:util(spam): Registering button lmeta
:util(spam): Registering button rmeta
:util(spam): Registering button !
:util(spam): Registering button "
:util(spam): Registering button #
:util(spam): Registering button $
:util(spam): Registering button %
:util(spam): Registering button &
:util(spam): Registering button '
:util(spam): Registering button (
:util(spam): Registering button )
:util(spam): Registering button *
:util(spam): Registering button +
:util(spam): Registering button ,
:util(spam): Registering button -
:util(spam): Registering button .
:util(spam): Registering button /
:util(spam): Registering button 0
:util(spam): Registering button 1
:util(spam): Registering button 2
:util(spam): Registering button 3
:util(spam): Registering button 4
:util(spam): Registering button 5
:util(spam): Registering button 6
:util(spam): Registering button 7
:util(spam): Registering button 8
:util(spam): Registering button 9
:util(spam): Registering button :
:util(spam): Registering button ;
:util(spam): Registering button <
:util(spam): Registering button =
:util(spam): Registering button >
:util(spam): Registering button ?
:util(spam): Registering button @
:util(spam): Registering button A
:util(spam): Registering button B
:util(spam): Registering button C
:util(spam): Registering button D
:util(spam): Registering button E
:util(spam): Registering button F
:util(spam): Registering button G
:util(spam): Registering button H
:util(spam): Registering button I
:util(spam): Registering button J
:util(spam): Registering button K
:util(spam): Registering button L
:util(spam): Registering button M
:util(spam): Registering button N
:util(spam): Registering button O
:util(spam): Registering button P
:util(spam): Registering button Q
:util(spam): Registering button R
:util(spam): Registering button S
:util(spam): Registering button T
:util(spam): Registering button U
:util(spam): Registering button V
:util(spam): Registering button W
:util(spam): Registering button X
:util(spam): Registering button Y
:util(spam): Registering button Z
:util(spam): Registering button [
:util(spam): Registering button \
:util(spam): Registering button ]
:util(spam): Registering button ^
:util(spam): Registering button _
:util(spam): Registering button `
:util(spam): Registering button a
:util(spam): Registering button b
:util(spam): Registering button c
:util(spam): Registering button d
:util(spam): Registering button e
:util(spam): Registering button f
:util(spam): Registering button g
:util(spam): Registering button h
:util(spam): Registering button i
:util(spam): Registering button j
:util(spam): Registering button k
:util(spam): Registering button l
:util(spam): Registering button m
:util(spam): Registering button n
:util(spam): Registering button o
:util(spam): Registering button p
:util(spam): Registering button q
:util(spam): Registering button r
:util(spam): Registering button s
:util(spam): Registering button t
:util(spam): Registering button u
:util(spam): Registering button v
:util(spam): Registering button w
:util(spam): Registering button x
:util(spam): Registering button y
:util(spam): Registering button z
:util(spam): Registering button {
:util(spam): Registering button |
:util(spam): Registering button }
:util(spam): Registering button ~
:util(spam): Registering button mouse1
:util(spam): Registering button mouse2
:util(spam): Registering button mouse3
:util(spam): Registering button mouse4
:util(spam): Registering button mouse5
:util(spam): Registering button wheel_up
:util(spam): Registering button wheel_down
:util(spam): Registering button wheel_left
:util(spam): Registering button wheel_right
:interrogatedb(debug): Creating interrogate database
:interrogatedb(debug): Got interrogate data for module libp3dtoolbase
:interrogatedb(debug): Got interrogate data for module libp3dtoolutil
:interrogatedb(debug): Got interrogate data for module libp3prc
:interrogatedb(debug): Got interrogate data for module libp3downloader
:interrogatedb(debug): Got interrogate data for module libp3express
:interrogatedb(debug): Got interrogate data for module libp3recorder
:interrogatedb(debug): Got interrogate data for module libp3pgraphnodes
:interrogatedb(debug): Got interrogate data for module libp3pgraph
:interrogatedb(debug): Got interrogate data for module libp3movies
:interrogatedb(debug): Got interrogate data for module libp3grutil
:interrogatedb(debug): Got interrogate data for module libp3chan
:interrogatedb(debug): Got interrogate data for module libp3pstatclient
:interrogatedb(debug): Got interrogate data for module libp3char
:interrogatedb(debug): Got interrogate data for module libp3collide
:interrogatedb(debug): Got interrogate data for module libp3device
:interrogatedb(debug): Got interrogate data for module libp3dgraph
:interrogatedb(debug): Got interrogate data for module libp3display
:interrogatedb(debug): Got interrogate data for module libp3pipeline
:interrogatedb(debug): Got interrogate data for module libp3event
:interrogatedb(debug): Got interrogate data for module libp3gobj
:interrogatedb(debug): Got interrogate data for module libp3gsgbase
:interrogatedb(debug): Got interrogate data for module libp3linmath
:interrogatedb(debug): Got interrogate data for module libp3mathutil
:interrogatedb(debug): Got interrogate data for module libp3parametrics
:interrogatedb(debug): Got interrogate data for module libp3pnmimage
:interrogatedb(debug): Got interrogate data for module libp3text
:interrogatedb(debug): Got interrogate data for module libp3tform
:interrogatedb(debug): Got interrogate data for module libp3putil
:interrogatedb(debug): Got interrogate data for module libp3audio
:interrogatedb(debug): Got interrogate data for module libp3pgui
:interrogatedb(debug): Got interrogate data for module libp3net
:interrogatedb(debug): Got interrogate data for module libp3nativenet
:interrogatedb(debug): Got interrogate data for module libp3dxml
:interrogatedb(debug): Got interrogate data for module libp3pnmtext
:interrogatedb(debug): Python 3.7
Here is the run error
Warning:  unable to auto-locate config files in the directory named by "<auto>etc".
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "main.py", line 10, in <module>
  File "main.py", line 8 in __init__
  File "direct\showbase\Showbase.py", line 338, in __init__
  File "direct\showbase\Showbase.py", line 1020, in openDefaultWindow
  File "direct\showbase\Showbase.py", line 1055, in openMainWindow
  File "direct\showbase\Showbase.py", line 765, in openWindow
  File "direct\showbase\Showbase.py", line 751, in <lambda>
  File "direct\showbase\Showbase.py", line 817, in _doOpenWindow
  File "direct\showbase\Showbase.py", line 647, in makeDefaultPipe
  File "direct\directnotify\Notifier.py", line 130, in error
Exception: No graphics pipe is available!
Your config.prc file must name at least one valid panda display
library via load-display or aux-display.
[70320 Failed to execute script main

You are missing a plugin for graphical output.

pandagl

setup(
    name="Hello World",
    options = {
        'build_apps': {
            'console_apps': {
                'hello_world': 'main.py',
            },
            'plugins': [
                'pandagl',
            ],
        },
    }
)

You can check out this file for an example setup.py:


Oh, and welcome to the community!