赞
踩
当我们在centos7中安装了pycharm后,无论怎么切换输入法都不能在代码中输入中文。(centos7中有自带的中文输入法)
遇见这种情况,我们需要配置一下pycharm.sh脚本,打开我们的pycharm的安装包,例如我的路径是: temp/softwear/pycharm-community-2018.2.4/bin/pycharm.sh
vim temp/softwear/pycharm-community-2018.2.4/bin/pycharm.sh
- export GTK_IM_MODULE=ibus
- export QT_IM_MODULE=ibus
- export XMODIFIERS=@im=ibus
为了解决这个问题,我们安装一下搜狗输入法
sudo yum install alien -y
sudo yum install qtwebkit -y
- # sogoupinyin的版本号根据自己下载的版本,自行更改
- alien -r sogoupinyin_2.2.0.0108_amd64.deb
- (py3) [root@localhost softwear]# rpm -ivh sogoupinyin-2.2.0.0108-2.x86_64.rpm
- 准备中... ################################# [100%]
- 软件包 sogoupinyin-2.2.0.0108-2.x86_64 已经安装
- file / from install of sogoupinyin-2.2.0.0108-2.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
- file /usr/bin from install of sogoupinyin-2.2.0.0108-2.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
- file /usr/lib from install of sogoupinyin-2.2.0.0108-2.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64
重启生效!
完毕!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。