在终端中尝试了以下命令,
$ 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
有谁知道我该怎么办?
答案 0 :(得分:0)
您需要使用componentDidMount
然后dbus
brew install dbus