Repository: zeppelin Updated Branches: refs/heads/master b24c5ecd3 -> c95d89684
[zeppelin-3639] Add Ipython interpreter prerequisite check for protobuf ### What is this PR for? This is to protobuf prerequisite check when starting ipython kernel. This is required since from grpcio 1.12.0 it's independent from protobuf ### What type of PR is it? [ Improvement ] ### Todos * [x] - add protobuf prerequisite check * [x] - add to ipython docs ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-3639 ### How should this be tested? 1. remove grpcio and protobuf 2. install latest grpcio and try to run ipython interpreter - should fail 3. then install protobuf and try again - should work ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? * Is there breaking changes for older versions? * Does this needs documentation? Author: Khalid Huseynov <khalid...@gmail.com> Closes #3084 from khalidhuseynov/fix/ZEPPELIN-3639 and squashes the following commits: 066e061d2 [Khalid Huseynov] fix ipython documentation 58c06898b [Khalid Huseynov] add protobuf prerequsite check Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/c95d8968 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/c95d8968 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/c95d8968 Branch: refs/heads/master Commit: c95d89684132f95e4b1d7e3beecc3af6d1a712b2 Parents: b24c5ec Author: Khalid Huseynov <khalid...@gmail.com> Authored: Thu Jul 19 16:03:58 2018 +0900 Committer: Jeff Zhang <zjf...@apache.org> Committed: Thu Aug 2 15:37:48 2018 +0800 ---------------------------------------------------------------------- docs/interpreter/python.md | 3 ++- .../main/java/org/apache/zeppelin/python/IPythonInterpreter.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c95d8968/docs/interpreter/python.md ---------------------------------------------------------------------- diff --git a/docs/interpreter/python.md b/docs/interpreter/python.md index 94bffd0..82280ac 100644 --- a/docs/interpreter/python.md +++ b/docs/interpreter/python.md @@ -258,8 +258,9 @@ IPython is more powerful than the default python interpreter with extra function - Jupyter `pip install jupyter` - grpcio `pip install grpcio` + - protobuf `pip install protobuf` -If you already install anaconda, then you just need to install `grpcio` as Jupyter is already included in anaconda. +If you already install anaconda, then you just need to install `grpcio` as Jupyter is already included in anaconda. For grpcio version >= 1.12.0 you'll also need to install protobuf separately. In addition to all basic functions of the python interpreter, you can use all the IPython advanced features as you use it in Jupyter Notebook. http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c95d8968/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java ---------------------------------------------------------------------- diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java index 2d3c817..3c646ae 100644 --- a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java @@ -186,6 +186,9 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand if (!freezeOutput.contains("grpcio=")) { return "grpcio is not installed"; } + if (!freezeOutput.contains("protobuf=")) { + return "protobuf is not installed"; + } LOGGER.info("IPython prerequisite is met"); } catch (Exception e) { LOGGER.warn("Fail to checkIPythonPrerequisite", e);