这个问题是在我试图运行redshift-gtk时开始的。我手动安装了这个程序,它通过redshift运行得很好,但是我希望它能与指示器一起运行。我总是得到以下输出:
Traceback (most recent call last):
File "/usr/local/bin/redshift-gtk", line 26, in <module>
from redshift_gtk.statusicon import run
File "/usr/local/lib/python3.8/site-packages/redshift_gtk/statusico
我有16.04.1 LTS。安装系统后,我做了以下操作:
更新-替代品--删除python /usr/bin/python 2
更新-替代品--安装/usr/bin/python python /usr/bin/python 3
但由于以下问题,我现在无法更新系统、程序和包:
sudo apt-get dist-upgrade
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Расчёт обновлений… Готово
我有一个运行中的python程序,它使用安装在自制软件中的GTK3。在更新我的OSX系统之后,我现在得到了错误:
import gi
File "/usr/local/lib/python2.7/site-packages/gi/__init__.py", line 42, in <module>
ImportError: cannot import name _gi
产生此错误的最小示例是:
# import_gi.py
import gi
print gi.__dict__
它产生:
=> /usr/local/Cellar/python\@2/2
我正在尝试安装用于python3的gi软件包(dropbox需要它)。我知道:
$ sudo apt install python3-gi
并得到:
python3-gi is already the newest version (3.36.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但当我这么做的时候
$ python3 -m gi
我得到:
/usr/local/bin/python3: No module named gi
我不使用anaconda或virtualenv。如何正确安装gi?
看起来,当我想切换到python3.8时,我已经中断了我的python安装。使用Ubuntu 18.04。尝试使用gi时,会出现以下错误:
$ python
Python 3.8.1 (default, Dec 31 2019, 18:42:42)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, Gio
我尝试过许多方法在我的Mint17.02上安装gi。
zen@zen:~ > sudo pip3 install gi
zen@zen:~ > sudo python3.4 -m pip install gi
Requirement already satisfied (use --upgrade to upgrade): gi in /usr/local/lib/python3.4/site-packages
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/p
我试着给普什佩尔做个指示灯,但没有用。当我注意到python3无法导入gi时,我试图通过终端运行。
bin > python3 pushbullet-indicator
Traceback (most recent call last):
File "pushbullet-indicator", line 26, in <module>
import gi
ImportError: No module named 'gi'
bin >
尝试手动导入。
~ > python3
Python 3.4.1 (default, Se
我正在尝试运行以下程序: import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst 但是我得到了: Traceback (most recent call last):
File "application.py", line 2, in <module>
import gi
ModuleNotFoundError: No module named 'gi' 我在使用Python3的Mac Sierra
我试图在Mac上运行textest &,以跟踪,但我一直遇到以下错误消息
> texttest &
[1] 58365
peter.walker in ~/dev-projects/gildedrose-ruby-kata on branch main > Could not start TextTest 4.1.3 GUI due to PyGI/PyGObject GUI library problems :
Unable to import PyGI module 'Gtk' - No module named 'gi'
[1
我将我的python3版本更新为3.10,现在我的便条出现了这个错误
Traceback (most recent call last):
File "/usr/bin/indicator-stickynotes", line 21, in <module>
from stickynotes.gui import *
File "/usr/share/indicator-stickynotes/stickynotes/gui.py", line 20, in <module>
import gi
File
我对Ubuntu相当陌生,我试图在Ubuntu13.10上运行更新管理器。我得到:
jacopo@jacopo-laptop:~$ update-manager
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <
我昨天安装了Python3,但我觉得我做得不太好:
:~$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import
我正在尝试运行一个python (Version3.6.2)程序,该程序也使用了"gi“模块。当我试图导入"gi“时,它会给出以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gi/__init__.py", line 39
print u
我之前已经做了一些关于这个错误的研究。这里有一些与StackOverflow相关的解释,虽然建议的解决方案是相当无关的。
当我尝试从gi.repository导入Gtk时,它崩溃了,输出如下:
`bash-4.2$ python3 Python 3.2 (r32:88445, Feb 21 2011, 21:11:06) [GCC 4.6.0 20110212 (Red Hat 4.6.0-0.7)] on linux2 Type "help", "copyright", "credits" or "licen
我已经尝试开始使用Glade软件来制作一些与Python集成的GUI。当我试图在我的代码中导入gi时,我收到了一个与版本相关的错误。没有满足要求的版本。Pycharm建议运行此命令pip install gi,但我收到相同的错误。有什么想法吗?这是一个疑难解答的截图:https://imgur.com/a/hPlH0CZ,谢谢 不推荐使用: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintaine
我正在跟踪,并试图在虚拟环境中运行一个可工作的安装。我已经通过Ubuntu安装了。事情看起来是这样的:
:~$ mkvirtualenv py3 --python=/usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in py3/bin/python3
Also creating executable in py3/bin/python
Installing setuptools, pip...py
我正在尝试在PyCharm的Python2.7环境中安装PyGObject,但失败了,详细信息如下:
Running setup.py clean for PyGObject
Failed to build PyGObject
Installing collected packages: PyGObject
Running setup.py install for PyGObject: started
Running setup.py install for PyGObject: finished with status 'error'
Complete o
当我尝试从Gauke终端或XTerm打开终端时,请使用
gnome-terminal
它显示了这个错误:
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot
平台为Windows7 64位,使用从安装的Python2.7和GTK3+
由于此原因,exe已编译但无法运行。
The following modules appear to be missing
['gi.repository.Gdk', 'gi.repository.Gtk', 'overrides.registry']
如何正确地包含这些文件?
在.py文件中导入
from gi.repository import Gtk, Gdk
我的安装文件
#!/usr/bin/env python
from distutils.core impo
帮助那些试图帮助我的人。这是我的密码。我得到的错误和最后的实际数据样本。
所需的输出将消除具有多个不同MAC值的所有接口。从我想要写到excel文件的输出中删除。vlan和类型列并不重要。
nf_file = filedialog.askopenfilename() # here we grab a filename to parse
timestr = time.strftime("%m%d")
df = pd.read_csv(nf_file)
#Drop 'interface' with more than one different 'mac&