Python spyder无法初始化GLX [英] Python spyder could not initialize GLX
问题描述
尝试设置桌面工作站进行图像处理.我最近安装了ubuntu 16.04,并通过了
Trying to setup a desktop station for image processing. I recently installed ubuntu 16.04 and went through the guide by Adrian to install python3, cv2, and virtual enviroments.
我使用的是cv2 3.2.0,而不是cv2 3.1.0,但除此之外,所有内容都是相同的.
Instead of using cv2 3.1.0, I used cv2 3.2.0 but besides that, everything was the same.
正确安装并运行各种测试后,我确认python3正常工作,并且cv2已链接到python.
after installing correctly and running the various tests, I confirmed that python3 was working and cv2 was linked to python.
由于我习惯了图形界面,因此我决定安装 spyder ,因为它具有不错的GUI系统.我之前在2个单独的设备(一台笔记本电脑和一个raspberry pi 3)上完成了此操作.但是,在此台式计算机上安装后,我遇到了一个奇怪的问题.
As I am used to graphical interfaces, I decided to install spyder as it has a nice GUI system. I have done this before on 2 separate devices (a laptop and a raspberry pi 3). However, upon installing on this desktop computer I ran into a weird problem.
每当我运行spyder时,都会导致以下错误
When ever I run spyder, It results in the error below
Could not initialize GLX
Aborted (core dumped)
我一直在网上寻找解决方案,但似乎找不到解决这个问题的方法
I have been looking online for solutions but I cannot seem to find an answer to this problem
我去ubuntu上搜索核心转储文件,发现一堆文件都包含相同的代码00000033.
edit: I went searching for core dump files on ubuntu and I found a bunch of files all containing the same code 00000033.
推荐答案
首先,对于我们的理解:
First of all, for our understanding:
GLX("OpenGL扩展到X窗口系统"的缩写)是 X Window System核心协议的扩展,提供了一个接口 在OpenGL和X Window系统之间以及对OpenGL的扩展 本身.它使希望使用OpenGL的程序能够在 X Window系统提供的窗口. GLX区分两个 状态":间接状态和直接状态.
GLX (initialism for "OpenGL Extension to the X Window System") is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishing to use OpenGL to do so within a window provided by the X Window System. GLX distinguishes two "states": indirect state and direct state.
无论如何,我在安装QT时遇到了类似的问题,并通过安装以下软件包解决了该问题: libgl1-mesa-dri
Any way, I had a similar problem with QT installation and solved it installing the following package: libgl1-mesa-dri
sudo apt-get install libgl1-mesa-dri
我发现的另一个类似解决方案是:
Another similar solution I found was:
sudo apt-get purge nvidia*
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig
sudo rm /etc/X11/xorg.conf
对于32位,
sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386
对于64位
sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64
sudo dpkg-reconfigure xserver-xorg
希望对您有帮助.
这篇关于Python spyder无法初始化GLX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!