mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? Adding a python 2 &3 interpreter. It's a basic implementation (no py4j for example), with a java ProcessBuilder object used to instantiate a python REPL. The interpreter doesn't bring it own python binary but uses the python specified by python.path configutation. Thus, you can still use your specific installed python modules (scikit-learn, matplotlib...) and the interpreter is able to work with python 2 & 3 without change. I had a python helper function (zeppelin_show() ) to easily display matplotlib graph as SVG. ### What type of PR is it? [Feature] ### Todos * [x] - Code review * [x] - Improve bootstrap.py : choose available helper functions and their names * [x] - Unit / IT tests ? * [x] documentation updates needed, that AhyoungRyu pointed out * [X] LICENSE needs to be updated to include all non-apache licensed dependencies (i.e AFAIK Py4j is BSD ) in bin-license * [x] double-check that code formatting conforms project style guide * [x] the branch need to be rebased on latest master. ### What is the Jira issue? [ZEPPELIN-502](https://issues.apache.org/jira/browse/ZEPPELIN-502?jql=project%20%3D%20ZEPPELIN%20AND%20text%20~%20%22python%22) ### How should this be tested? 1. In interpreter screen, in Python section, specify in python.path the python binary you want to use 2. In a paragraph, you can use the interpreter with **_%python_**. Calling help() will describe you the interpreter functionnalities. 3. Install py4j (pip install py4j) if you want to use input form ### Screenshots     ### Questions: * Does the licenses files need update? Yes, only bin-license (py4j) * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Hervé RIVIERE <[email protected]> Closes #869 from hriviere/PR_interpreter_python and squashes the following commits:80b6e75[Hervé RIVIERE] [ZEPPELIN-502] move BSD py4j license to zeppelin-distribution/src/bin_license/licensea4b82a5[Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review3252353[Hervé RIVIERE] [ZEPPELIN-502] Formatting code to respect project convention54ec4f1[Hervé RIVIERE] [ZEPPELIN-502]Improving doc following @AhyoungRyu review6a831bc[Hervé RIVIERE] [ZEPPELIN-502] Add BSD py4j license11e1b9c[Hervé RIVIERE] [ZEPPELIN-502] minor changes in python.mde5d0bdb[Hervé RIVIERE] [ZEPPELIN-502] change PYTHON_PATH to ZEPPELIN_PYTHONc62ac98[Hervé RIVIERE] [ZEPPELIN-502] Improve python.md5008125[Hervé RIVIERE] [ZEPPELIN-502] Improve python.md with features not yet supported and technical description7d533e1[Hervé RIVIERE] [ZEPPELIN-502] Add tests and reformating code to help tests writingfecaf25[Hervé RIVIERE] [ZEPPELIN-502] Rename python.path to python and default from /usr/bin/python to python02d1320[Hervé RIVIERE] [ZEPPELIN-502] Input form, change from simple input form to native (pyspark syntax)60d2956[Hervé RIVIERE] [ZEPPELIN-502] Indent as pep8 convention9bdb192[Hervé RIVIERE] [ZEPPELIN-502] Add python.md to _navigation.html7142aa5[Hervé RIVIERE] [ZEPPELIN-502] Catch exception in logger.error1a86ad7[Hervé RIVIERE] [ZEPPELIN-502] Python interpreter group
20 KiB
432x484px
20 KiB
432x484px