0

I've just started using Light Table and can't get iPython working under OSX 10.10. Relevant version numbers are iPython 3.2.1, Python 3.4.3 or 2.7.10, and LightTable version 0.7.2 (installed via a Homebrew Cask and .zip file).

Evaluating Python code works as I'd expect and I get nice tab-completion, but I can't get any graphical output. The "Connection Bar" shows a python connection rather than ipython even though ipython is available on the command line and I can successfully run ipython notebook and have it pop up a web-browser (this requires a working copy of pyzmq).

Neither Python 2.7 nor 3.4 work, and I've tried the official LT .zip as well as installing as brew cask install lighttable.

Changing my User.behaviours to explicitly reference the "correct" virtualenv:

[:app :lt.plugins.python/python-exe  "/Users/smason/.virtualenvs/py3/bin/python"]
[:app :lt.plugins.python/ipython-exe "/Users/smason/.virtualenvs/py3/bin/ipython"]

doesn't seem to affect things (verified by getting appropriate errors when misspelling binary, and by running print(sys.version) and looking at output in console).

Sam Mason
  • 15,216
  • 1
  • 41
  • 60

1 Answers1

1

The problem was that iPython support with Light Table is pretty out of date. It is using features that were exposed in pre-1.0 versions of iPython and it's not been updated while iPython's API has changed.

The most minimal change to Light Table that fixed this for me is in:

https://github.com/LightTable/Python/pull/31

If you're patching your own install you would want to modify:

LightTable.app/Contents/Resources/app.nw/plugins/python/py-src/ltipy.py

but with iPython 4 being released yesterday more code needs to change—hopefully (if you're reading this) I'll get around to making this larger change.

Sam Mason
  • 15,216
  • 1
  • 41
  • 60