Spyder: Spyder cannot accept Chinese input

Created on 8 Feb 2017  ·  24Comments  ·  Source: spyder-ide/spyder

Description of your problem

What steps will reproduce the problem?

  1. When i edit with a django project
  2. I try to input Chinese character
  3. but i failed

What is the expected output? What do you see instead?
When i input a Chinese character,i got Chinese Pinyin on screen.
I use the SougouINPUT

Please provide any additional information below

Versions and main components

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

Editor Bug

Most helpful comment

可以这么解决
首先需要自己编译fcitx-qt5:
安装依赖:sudo apt install cmake extra-cmake-modules fcitx-libs-dev libxkbcommon-dev
克隆或下载最新版的fcitx-qt5: https://github.com/fcitx/fcitx-qt5/releases
然后编译:cmake ./
make
最后在platforminputcontext文件夹中的libfcitxplatforminputcontextplugin.so复制到anaconda3/plugins/platforminputcontexts/文件夹中,重新启动spyder即可输入中文。
我的系统是Ubuntu 18.04 LTS,Spyder是通过Anaconda安装的。

All 24 comments

Could you write those characters here?

Of course i can write here @ccordoba12
哈哈哈哈

Ha ha.

I don't use Sougou but I use fcitx to input pinyin on Debian, which is almost the same as Ubuntu. My experience is that Chinese input does not work in the Anaconda version of Spyder, but it does work in the Debian version of Spyder. Pasting Chinese characters into Spyder always works. It may have something to do with how Qt is packaged.

@willhunger How did you install Spyder?

@jitseniesen
Yes,So do I.
I install Spyder by pip

I met the same problem when I wrote comment using chinese

@xyl576807077
请问现在你是否解决了?

@willhunger
没有解决,已经暂时使用jupyter notebook了

@xyl576807077 我也切换到了vscode

现在修复好了么?

@ccordoba12 @jitseniesen could fix this problem now? it makes work so troublesome.

Sorry, none of us are Chinese speakers/users. So we'll wait until a Chinese hacker send us a pull request to fix it.

@ccordoba12 I also install Japanese input methods(fcitx-anthy),and find the same issue occur.so I think it's a problem about " the Anaconda version of Spyder in Ubuntu 16.04LTS" , which maybe can't accept any other language than english.thanks.

我也有相同的情況!!

我的環境是:
Ubuntu 16.04 LTS
anaconda 的spyder

之前使用 ibus框架下的的 chewing(新酷音)輸入法可以正常在 spyder下輸入中文。
最近想學拼音輸入法,因此轉戰 fcitx框架下的 sougou拼音輸入法,便不能正常輸入中文了。
(註: 其他的應用程式(jupyter、 chrome等等)都可以正常輸入)

不知道這東西有沒有解?

更新

剛剛測試了一下,在 fcitx框架所有的輸入法都無法鍵入中文。
但是 ibus的新酷音以及拼音都可以正常輸入。

看來這是程式與 fcitx框架不相容的問題。

@t104306033
问题是fcitx 与所有的Qt5构建的应用都不能兼容

@wjt-one
Fctix cannot input any characters except Latino characters to Qt5 Application.
So you can change your input method framework to hack this problem

可以这么解决
首先需要自己编译fcitx-qt5:
安装依赖:sudo apt install cmake extra-cmake-modules fcitx-libs-dev libxkbcommon-dev
克隆或下载最新版的fcitx-qt5: https://github.com/fcitx/fcitx-qt5/releases
然后编译:cmake ./
make
最后在platforminputcontext文件夹中的libfcitxplatforminputcontextplugin.so复制到anaconda3/plugins/platforminputcontexts/文件夹中,重新启动spyder即可输入中文。
我的系统是Ubuntu 18.04 LTS,Spyder是通过Anaconda安装的。

@cedarice 多谢
Based on their comment, it looks like fcitx-qt5 needs to be packaged for conda.

That's what I got too. @jitseniesen, do you know what's he/she saying? I could use his/her instructions to package fcitx-qt5 for conda.

Google Translate seems pretty readable:

Can solve this
First you need to compile fcitx-qt5 yourself:
Installation dependencies: sudo apt install cmake extra-cmake-modules fcitx-libs-dev libxkbcommon-dev
Clone or download the latest version of fcitx-qt5: https://github.com/fcitx/fcitx-qt5/releases
Then compile: cmake ./
Make
Finally in the platforminputcontext folder libfcitxplatforminputcontextplugin.so copied to the anaconda3/plugins/platforminputcontexts/ folder, restart spyder to enter Chinese.
My system is Ubuntu 18.04 LTS. Spyder is installed via Anaconda.

Thanks @bcolsen! It seems pretty doable :+1:

I'll give it a try after we release 3.3

I think this is the right place for my problem. I'm running Spyder from Anaconda running from Bash on Ubuntu on Windows...all the latest versions.
After installing a bunch of Japanese fonts on the Ubuntu distro, the Japanese characters all appear in a highly stylized font "MikaChan", the first one installed.
This isn't very readable, but I don't see any way to change the font used for rendering Japanese text in the iPython console.

The fix is not work for me. I am on Archlinux x64, anaconda 5.1 py36 and spyder 3.2.6 package from anaconda. I've already try a soft link or a hard copy of libfcitxplatforminputcontextplugin.so(Archlinux fcitx-qt5 package) to anaconda/plugins/platforminputcontexts, but seems nothing happend.

I got the same problem, and every time I input one char,it shows two on the screen

Was this page helpful?
0 / 5 - 0 ratings