ubuntu pycharm无法输入中文 | pycharm python console 报错
文章目录pycharm 无法输入中文pycharm python console 报错pycharm 无法输入中文ubuntu pycharm 搜狗输入法无法输入中文网上说在python.sh加上啥啥啥export,或者在help里面edit custom vm options加上啥啥啥,没有解决问题换低版本的 pycharm 即可pycharm旧版本,点击跳转我换了2019版本,有效pychar
pycharm 无法输入中文
ubuntu pycharm 搜狗输入法无法输入中文
网上说在python.sh加上啥啥啥 export,或者在help里面edit custom vm options加上啥啥啥,没有解决问题
换低版本的 pycharm 即可
pycharm旧版本,点击跳转
我换了2019版本,有效
pycharm python console 报错
python 3.8 用低版本的pycharm报错:
1. /opt/pycharm/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:138: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if found.get(name) is not 1:
2.Error:Console process terminated with error:
(省略一万字)
File "/opt/pycharm/helpers/third_party/thriftpy/_shaded_thriftpy/_compat.py", line 102, in init_func_generator
new_code = types.CodeType(len(varnames),
TypeError: an integer is required (got type bytes)
第1个,需要把/opt/pycharm/helpers/pydev/_pydevd_bundle/pydevd_resolver.py
文件的138行的is not
换成!=
。在pycharm里面不能直接编辑,权限不够
打开终端
注意:文件路径,是pycharm中报错的文件路径,比如/opt/pycharmxxxx(带版本号),复制过来
sudo vim /opt/pycharm/helpers/pydev/_pydevd_bundle/pydevd_resolver.py
:138 (冒号138,表示跳转到138行)
按 h(左)l(右)移动到 is not 的后面
i 进入插入模式,backspace 删除 is not
输入 !=
按键盘左上角 esc 退出编辑模式
:wq (冒号,w表示保存,q表示退出)
第2个,用同样的方式进入文件
sudo vim /opt/pycharm/helpers/third_party/thriftpy/_shaded_thriftpy/_compat.py
把101行开始的
if PY3:
new_code = types.CodeType(len(varnames),
0,
len(varnames),
code.co_stacksize,
code.co_flags,
code.co_code,
code.co_consts,
code.co_names,
varnames,
code.co_filename,
"__init__",
code.co_firstlineno,
code.co_lnotab,
code.co_freevars,
code.co_cellvars)
elif JYTHON:
from org.python.core import PyBytecode
换成
if PY3:
args = [len(varnames),
0,
len(varnames),
code.co_stacksize,
code.co_flags,
code.co_code,
code.co_consts,
code.co_names,
varnames,
code.co_filename,
"__init__",
code.co_firstlineno,
code.co_lnotab,
code.co_freevars,
code.co_cellvars]
if sys.version_info >= (3, 8, 0):
#Python 3.8 and above supports positional-only parameters. The number of such
#parameters is passed to the constructor as the second argument.
args.insert(2, 0)
new_code = types.CodeType(*args)
elif JYTHON:
from org.python.core import PyBytecode
重启pycharm即可

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)