pip: Could not find an activated virtualenv (required)

Open your ~/.bashrc file and see if this line is there – export PIP_REQUIRE_VIRTUALENV=true It might be causing the trouble. If it’s there, change it to false and run – source ~/.bashrc If not, run export PIP_REQUIRE_VIRTUALENV=false from terminal. Note: everything works the same if you have .bash_profile instead of .bashrc in your current user’s … Read more

Send notification to Mountain lion notification center

Notifications in Mountain Lion are handled by two classes. NSUserNotification and NSUserNotificationCenter. NSUserNotification is your actual notification, it has a title, a message etc. that can be set via properties. To deliver a notification that you’ve created, you can use the deliverNotification: method available in NSUserNotificationCenter. The Apple docs have detailed information on NSUserNotification & … Read more

How to simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?

Search for, download, and install Apple’s free Additional Tools for Xcode 8 (for previous Xcode releases search for Graphics Tools for Xcode according to your version). Note: free Apple Developer account required. Launch Quartz Debug application. Go to menu: Window —> UI Resolution. Check Enable HiDPI display modes. Quit Quartz Debug. Open System Preferences. Select … Read more

What is the “Illegal Instruction: 4” error and why does “-mmacosx-version-min=10.x” fix it?

From the Apple Developer Forum (account required): “The compiler and linker are capable of using features and performing optimizations that do not work on older OS versions. -mmacosx-version-min tells the tools what OS versions you need to work with, so the tools can disable optimizations that won’t run on those OS versions. If you need … Read more