No graphics pipe available

I’m using ubuntu 12.04 and i compiled version 1.8 using makepanda. It was something like :

python makepanda/makepanda.py --everything --installer

And everything went fine and i got a built directory and a .deb file
I installed the deb file, and i tried to run this :

from direct.showbase.ShowBase import ShowBase
 
class MyApp(ShowBase):
 
    def __init__(self):
        ShowBase.__init__(self)
 
app = MyApp()
app.run()

and i get the following error :

:display(warning): Unable to load: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    app = MyApp()
  File "test.py", line 6, in __init__
    ShowBase.__init__(self)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 244, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 884, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 920, in openMainWindow
    self.openWindow(*args, **kw)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 640, in openWindow
    win = func()
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 626, in <lambda>
    callbackWindowDict = callbackWindowDict)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 691, in _doOpenWindow
    self.makeDefaultPipe()
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 531, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/usr/share/panda3d/direct/directnotify/Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

I did some research and i thought there was something wrong with Config.prc. My PANDA_PRC_DIR is set to /usr/local/etc. I checked the directory and there was nothing there!
And I did the

from pandac.PandaModules import ConfigPageManager
print ConfigPageManager.getGlobalPtr()

and it says 0 explicit packages and 0 implicit packages. Any ideas?

I found the Conf.prc and Confauto.prc files in /etc/.
I changed the PANDA_PRC_DIR variable to point to /etc
Now the following stuff were loaded

python check.py 
0 explicit pages:

2 implicit pages:
  /etc/Config.prc
  /etc/Confauto.prc

Tried runnign the file again and got this :

python test.py 
:display(warning): Unable to load: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    app = MyApp()
  File "test.py", line 6, in __init__
    ShowBase.__init__(self)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 244, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 884, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 920, in openMainWindow
    self.openWindow(*args, **kw)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 640, in openWindow
    win = func()
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 626, in <lambda>
    callbackWindowDict = callbackWindowDict)
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 691, in _doOpenWindow
    self.makeDefaultPipe()
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 531, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/usr/share/panda3d/direct/directnotify/Notifier.py", line 132, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

And I noticed something else too. Every time I close the terminal and start a new one, the PANDA_PRC_DIR variable gets reset to nothing! I know running the export command everytime the system starts up is going to fix this problem. But since i compiled it from source and installed it using the resulting .deb file (makepanda.py), I thought PANDA_PRC_DIR would be pointing to the right location by default. Bug?
And the original PANDA_PRC_DIR is supposed to be /usr/local/etc right? And it was supposed to contain ONLY Config.prc and Configauto.prc right? I want to make sure i dont have any files missing :slight_smile:

Do you even have a libpandagl module? Did you build with OpenGL support? Running makepanda should first give you a list which modules it’s building with support for.

No i didnt do anything specifically. The only ‘other’ thing i might have done is install python2.7-dev package because python could not import the modules without it. Then I removed the first panda3d installation , recompiled the whole thing with '–everything ’ and ‘–installer’. So if the libpandagl module is a 3rdparty module, then nops, i havent got it.

And I suppose ‘–everything’ at the end of makepanda means i at least attempted to build with opengl support.

Makepanda automatically excludes support for packages you have not installed. You must have overlooked the warnings it raised regarding the missing packages.

I’m trying to compile panda3d1.8 on another system, with ubuntu 12.04.
makepanda generated the following warnings:

WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package fcollada, excluding from build
WARNING: Could not locate thirdparty package fftw, excluding from build
WARNING: Could not locate thirdparty package fmodex, excluding from build
WARNING: Could not locate thirdparty package gl, excluding from build
WARNING: Could not locate thirdparty package gles, excluding from build
WARNING: Could not locate thirdparty package gles2, excluding from build
WARNING: Could not locate thirdparty package egl, excluding from build
WARNING: Could not locate thirdparty package nvidiacg, excluding from build
WARNING: Could not locate thirdparty package squish, excluding from build
WARNING: Could not locate thirdparty package vrpn, excluding from build
WARNING: Could not locate thirdparty package bullet, excluding from build
WARNING: Could not locate thirdparty package rocket, excluding from build
WARNING: Could not locate thirdparty package xf86dga, excluding from build

I dont know if the opengl library that might be missing is gl, or gles.

I dont seem to have libpandagl. Where will it be located provided i have it?

I read in the forums that if i change to tinydisplay in the confing.prc file everything should work fine because then i’ll be using software rendering. I did that and it still throws the same error. So I wonder if its some issue with the path. PANDA_PRC_DIR variable seems to not have been set but ConfigPageManager.getGlobalptr() says that Config.prc and Confauto.prc are loaded. Both files reside at /etc.
echo $PANDA_PRC_DIR returns nothing.

libpandagl.so is built as part of makepanda, but only if it finds “gl”, which is OpenGL. Make sure you have the OpenGL development package installed when you run makepanda.

Nowawdays, tinydisplay is called p3tinydisplay (instead of tinydisplay). Try configuring that. libp3tinydisplay.so is also built as part of makepanda, but only if the appropriate X11 libraries are found. See if you build libp3tinydisplay as part of your Panda build.

Note that when you add “load-display foo”, you are telling panda to load libfoo.so, so if you have doubts as to whether that library exists, simply look for it in your Panda build.

David

Thanks a lot! I changed load-tinydisplay to load-p3tinydisplay and now i can finally get that hello world program to run!!! And I installed libgl-mesa-dev and tried to makepanda again and it does not say “gl” is missing. :smiley:
I thought opengl was just ‘there’ in every system (I used to use windows for an awfully long time) and it never occured to me that I’ll need specific dev packages to use it. Thanks again.