After much crawling around the internet, it seems that the reason this returns
Python 2.7.14 (default, Sep 27 2017, 12:15:00) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from Foundation import NSUserNotificationCenter >>> print NSUserNotificationCenter.defaultUserNotificationCenter() None
is due to the fact that the virtualenv doesn't respect that python was built as a framework. Copying the system (or macports or homebrew) python to the virtualenv fixes the problem but that seems absurd.
What exactly is going on here? I'm trying to use pyobjc in a project which has its own requirements.txt file. Requiring each user to do this hack seems wrong; what exactly is going on? Is this something that pyobjc can even fix? Or does virtualenv need an upstream patch?