如何在我的MAC电脑上安装python3.5中的notify2模块?

2024-05-12 20:24:15 发布

您现在位置:Python中文网/ 问答频道 /正文

在终端中尝试了以下命令

$ 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模块。所以,我试过了

^{pr2}$

试过哪个点子

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

有人知道我该怎么办吗?在


Tags: pipinpybuildvarsetuplineprivate