1

我想在 mac 上安装 pync 以显示通知。我试过了

$ pip install pync

git clone git://github.com/SeTeM/pync.git
cd pync
python setup.py install

sudo easy_install pync

显示错误为:

Last login: Thu Nov 21 12:20:51 on ttys000
fiss-Mac:~ fis$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pync import Notifier
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.8-intel/egg/pync/__init__.py", line 3, in <module>
  File "build/bdist.macosx-10.8-intel/egg/pync/TerminalNotifier.py", line 99, in <module>
  File "build/bdist.macosx-10.8-intel/egg/pync/TerminalNotifier.py", line 27, in __init__
Exception: pync was not properly installed. Head over to https://github.com/SeTeM/pync/ and file a bug.
>>> 
4

3 回答 3

1

您应该尝试 pip3 install pync 因为 pip3 适用于 mac 而不仅仅是 pip 。那是你应该尝试的。如果这不起作用 - 那么您应该尝试从 GitHub 链接安装它,如上述答案之一中所述。希望我有帮助!(:

于 2020-09-01T05:56:08.953 回答
0

Python 包索引中的pync包似乎无法正常工作。

直接从pync github repo安装将解决该问题:

pip install git+https://github.com/SeTeM/pync.git

于 2014-06-07T13:19:28.340 回答
0

只是有同样的问题。解压 egg 文件有助于解决问题:

cd /Library/Python/2.7/site-packages
sudo unzip pync-1.4-py2.7.egg
sudo rm -r EGG-INFO pync-1.4-py2.7.egg

$ python
Python 2.7.6 (default, Nov 12 2013, 13:26:39) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pync import Notifier
>>>
于 2014-08-05T06:33:07.890 回答