syabruk / pync

Python wrapper for Mac OS 10.8 Notification Center

Home Page:https://pypi.org/project/pync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to get it working on osx 10.9.3

ollu opened this issue · comments

After installing I try to run it in python terminal:

Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from pync import Notifier
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/pync/init.py", line 3, in
from .TerminalNotifier import Notifier
File "/Library/Python/2.7/site-packages/pync/TerminalNotifier.py", line 116, in
Notifier = TerminalNotifier()
File "/Library/Python/2.7/site-packages/pync/TerminalNotifier.py", line 29, in init
raise Exception("pync was not properly installed. Head over to https://github.com/SeTeM/pync/"
Exception: pync was not properly installed. Head over to https://github.com/SeTeM/pync/ and file a bug.

I've got the problem too, with the same version of OS X.

After a bit of investigation, it seems that TerminalNotifier.py does not find the terminal-notifier executable, because the vendor directory isn't copied in /usr/local/lib/python2.7/site-packages/pync

[rbelouin@mufasa ~]% ll /usr/local/lib/python2.7/site-packages/pync
total 40
-rw-r--r--  1 rbelouin  admin  4091 Jun 27 15:34 TerminalNotifier.py
-rw-r--r--  1 rbelouin  admin  5046 Jun 27 15:34 TerminalNotifier.pyc
-rw-r--r--  1 rbelouin  admin    60 Jun 27 15:32 __init__.py
-rw-r--r--  1 rbelouin  admin   239 Jun 27 15:32 __init__.pyc

Hope that will help.

I fixed it the hard way:

pip install pync
git clone git://github.com/SeTeM/pync.git

# I installed my python stack with Homebrew
cp -R pync/pync/vendor /usr/local/lib/python2.7/site-packages/pync

# I guess you should copy the vendor folder to the following destination, for a "traditional" pip installation
sudo cp -R pync/pync/vendor /Library/Python/2.7/site-packages

Guys, I think you have to fix your setup.py ;)

Seams to work but I will look for other solutions since I was looking for something that I could distribute as a requirement to my own script.

NB: I'm not the author of pync, nor a maintainer. Not sure that closing the issue will help the authors fix it :)

I agree totally My finger must have slipped :)

@ollu, @rbelouin sorry, guys, I have no idea how to fix it. If you know solution for this issue, create PR, please.

I've managed to fix it, will open a PR today.