spyder: Spyder cannot accept Chinese input

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

  • Spyder Version:Spyder 3.12
  • Python Version:Python 3.53
  • Operating system:ubuntu 16.10
  • Python 3.5.2+ 64bits, Qt 5.7.0, PyQt5 5.7 on Linux

Dependencies

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

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 2
  • Comments: 31 (10 by maintainers)

Most upvoted comments

可以这么解决 首先需要自己编译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安装的。

Just stumbled across this issue as I wasn’t able input Japanese with fcitx in spyder, so I want to write a quick update. The solution below provided by @ccordoba12 still totally works now and solve the issue:

If not, you need to run

conda create -n spyder-env -c conda-forge python=3.9 spyder fcitx-qt5
conda activate spyder-env
spyder

I noticed tho python=3.9 is not necessary as I successfully install it on Python 3.11. And in my test, a dedicate conda env for spyder, as suggest in @ccordoba12 's code, is really recommended as it can avoid compatible issues.

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.

To everyone subscribed to this issue: it’ll be fixed in Spyder 6 (to be released before the end of the year) for our Conda packages and also our new Linux installer.

@ccordoba12 It works, thanks!

Hey @1900011604, thanks for the reminder. It seems this problem is solved now, but only if you’re using conda-forge.

If you’re already using it, you need to run

conda install -c conda-forge fcitx-qt5

If not, you need to run

conda create -n spyder-env -c conda-forge python=3.9 spyder fcitx-qt5
conda activate spyder-env
spyder

That’s because conda-forge and Anaconda are incompatible, so you can’t mix packages from both.

Please do that and let us know if it works for you.

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