vpython in ubuntu/fedora16 : failed to initialize any OpenGL
I have a Ubuntu 10.10
when I try use visual with python I get
>>> from visual import *
>>> sphere()
VPython ***CRITICAL ERROR***: /build/buildd/python-visual-5.12/./src/gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting.
Note开发者_运维百科: this happens in Fedora 16 as well:
; env VPYTHON_DEBUG=1 ipython test.py
VPython: ./python/cvisualmodule.cpp:144: Importing cvisual from vpython-core2.
VPython: ./gtk2/display.cpp:66: Opening a window from Python.
VPython: ./gtk2/display.cpp:474: Starting GUI thread.
VPython: ./gtk2/display.cpp:491: Adding new display object at address 0x25168a0
VPython ***CRITICAL ERROR***: ./gtk2/render_surface.cpp:88: render_surface: failed to initialize any OpenGL configuration, Aborting.
This could be due to a library conflict between MESA and NVidia libGL libraries as described in this email thread. Just moving /usr/lib/libGL.so
away (take a backup), running ldconfig
, and fixing the broken /usr/lib/libGL.so
link should solve your problem.
精彩评论