【问题标题】:How to fix notify2 'dbus' error in Python 3 on Windows 10如何在 Windows 10 上修复 Python 3 中的 notify2 'dbus' 错误
【发布时间】:2019-09-29 01:44:55
【问题描述】:
 import notify2 
 notify2.Notification('title')

我在 Windows 10 上使用 Python 3 和 anaconda。当我运行它时,它正在显示

Traceback (most recent call last):
  File "E:\Python Scripting\Upwork RSS Feed Notification\upwork_rss\src\py_s.py", line 56, in <module>
    import notify2
  File "C:\ProgramData\Anaconda3\lib\site-packages\notify2.py", line 39, in <module>
    import dbus
ModuleNotFoundError: No module named 'dbus'

我该如何解决这个问题?

【问题讨论】:

  • 它显示错误:找不到满足 dbus 要求的版本(来自版本:无)错误:找不到 dbus 的匹配分发

标签: python python-3.x windows anaconda dbus


【解决方案1】:

安装 dbus 为

 pip install dbus-python

【讨论】:

  • 现在它显示为收集的包构建轮子:dbus-python dbus-python (setup.py) 的构建轮...错误错误:命令'c:\programdata\anaconda3\python 的完整输出.exe' -u -c '导入设置工具,标记化;__file__='"'"'C:\\Users\\MOHAMM~1\\AppData\\Local\\Temp\\pip-install-_y9q9dyi\\dbus- python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read() .replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))
  • 你使用的是window系统还是linux?
  • 如果窗口follow this
  • @sahasrara62 你能告诉linux吗?
  • @djangodude 您也可以使用此命令安装在基于 linux 的系统中
猜你喜欢
  • 2021-07-29
  • 2020-09-07
  • 2019-12-26
  • 2019-05-01
  • 1970-01-01
  • 2016-09-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多