Jupyter notebook and macOS High Sierra: "osascript: can't open default scripting component"

Viewed 3039

jupyter-notebook was working fine until I upgraded to macOS High Sierra. Anyone know how to resolve the "osacript: can't open default scripting component" problem? Searching this site and Google yielded no answers. I'm on Anaconda 4.3.24. Thanks.

$ jupyter notebook
[I 08:12:13.340 NotebookApp] The port 8888 is already in use, trying another port.
[I 08:12:13.360 NotebookApp] Serving notebooks from local directory: /Users/Greenhorn/Local/projects
[I 08:12:13.360 NotebookApp] 0 active kernels 
[I 08:12:13.360 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/?token=9d8bde3a675f28b3cbc4c87b7eb0c36788b4d28260d9ed39
[I 08:12:13.360 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 08:12:13.361 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8889/?token=9d8bde3a675f28b3cbc4c87b7eb0c36788b4d28260d9ed39
osascript: can't open default scripting component.
1 Answers

I just ran into exactly the same problem with osascript whilst diagnosing an issue with Emacs Applescript integration (Emacs reports the error as do-applescript: OSA language not available, but further debugging led me to osascript and its can't open default scripting component). I also recently upgraded to High Sierra.

Online one unfortunately finds too much advice that an OSX re-install is required.

In my case, a reboot fixed the issue.

You can diagnose by running the test command:

osascript -e 'tell app "Finder" to display dialog "Hello, World!"'

After the reboot, this should popup a "Hello, World!" dialog.

Related