gnome-terminal 出错 ImportError: cannot import name '_gi'
terminal
The new Windows Terminal and the original Windows console host, all in the same place!
项目地址:https://gitcode.com/gh_mirrors/term/terminal
免费下载资源
·
系统:ubuntu17
装了python2.7.13, 之后陆续装了python3.5.3, python3.6.1
本来默认的python版本是2.7, 改为3.6后, 就出现gnome-terminal用不了的问题:
$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi'
$ ls /usr/lib/python3/dist-packages/gi/
_constants.py _gobject overrides _signalhelper.py
docstring.py importer.py _propertyhelper.py types.py
_error.py __init__.py __pycache__
_gi_cairo.cpython-35m-x86_64-linux-gnu.so module.py pygtkcompat.py
_gi.cpython-35m-x86_64-linux-gnu.so _option.py repository
$ sudo cp _gi.cpython-35m-x86_64-linux-gnu.so _gi.cpython-36m-x86_64-linux-gnu.so
$ sudo cp _gi_cairo.cpython-35m-x86_64-linux-gnu.so _gi_cairo.cpython-36m-x86_64-linux-gnu.so
OK, 问题解决
GitHub 加速计划 / term / terminal
94.53 K
8.17 K
下载
The new Windows Terminal and the original Windows console host, all in the same place!
最近提交(Master分支:2 个月前 )
d04381ec
"HighContrast" is not a possible requested theme. So `_UpdateBackgroundForMica()` would force the settings UI to be light or dark. To fix this, we just check if we're in high contrast mode and, if so, we don't bother setting the requested theme. 8 天前
e83434ff
Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!).
Bonus points:
- we didn't need the theme dictionaries anymore, so I just moved them to the ResourceDictionary directly
- ParsedCommandLineTextBlockStyle isn't used. So I removed it altogether.
Validated command palette with multiple high contrast themes. See PR thread for demo.
Closes #17914 8 天前
更多推荐
已为社区贡献2条内容
所有评论(0)