Ubuntu VNC 打开spyder无法输入(检测不到键盘配置)解决方法

在ubuntu中安装好spyder后, 打开spyder发现无法输入。 
在打开spyder的终端窗口,有如下提示:

QXcbConnection: Failed to initialize XRandr 
Qt: XKEYBOARD extension not present on the X server. 
Qt: Could not determine keyboard configuration data from X server, will use hard-coded keymap configuration. 
Qt: Failed to compile a keymap! 
Current XKB configuration data search paths are: 
/home/xxx/anaconda3/lib 
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ‘:’ as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

解决方法

到自己的home目录下(~),打开资源配置文件:

cd ~
vim .bashrc

然后在文件末尾添加两行:

export XKB_DEFAULT_RULES=base
export QT_XKB_CONFIG_ROOT="/usr/share/X11/xkb:$QT_XKB_CONFIG_ROOT"

然后重新加载环境:

source .bashrc

打开spyder 问题解决

来源: https://blog.csdn.net/capecape/article/details/80000383

猜你喜欢

转载自www.cnblogs.com/jins-note/p/10004599.html