1. 程式人生 > >Ubuntu VNC 開啟spyder無法輸入(檢測不到鍵盤配置)解決方法

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