Bokeh can be used with both Python 2.7 and Python 3.  Additional dependencies are needed to work with Python 2.7.   In fact, the &quot;write call-back functions in Python&quot; capability uses a Python to JS compiler called Flexx -- <a href="http:&#x2F;&#x2F;flexx.readthedocs.org&#x2F;en&#x2F;latest&#x2F;flexjs" rel="nofollow">http:&#x2F;&#x2F;flexx.readthedocs.org&#x2F;en&#x2F;latest&#x2F;flexjs</a>.  Flexx is currently Python 3 only (though 2.7 support is coming for it).