簡體   English   中英

如何使用我的MAC計算機在python 3.5中安裝notify2模塊?

[英]how to install notify2 module in python 3.5 with my MAC computer?

在終端中嘗試了以下命令,

$ pip3 install notify2


Collecting notify2
  Using cached notify2-0.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/setup.py", line 2, in <module>
        import notify2
      File "/private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/notify2.py", line 38, in <module>
        import dbus
    ImportError: No module named 'dbus'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/

因此,似乎我需要先安裝dbus模塊。 所以,我嘗試

$ pip3 install dbus
Collecting dbus
  Could not find a version that satisfies the requirement dbus (from versions: )
No matching distribution found for bus

嘗試了哪個點

$ which pip
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip

有誰知道我該怎么辦?

您需要安裝dbus使用brew install dbus然后pip install dbus-python

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM