Skip to content

Commit

Permalink
[ZEPPELIN-5804] support python 3.10 (#4453)
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimWILL authored Sep 6, 2022
1 parent 7134756 commit f42943c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ protected Map<String, String> setupKernelEnv() throws IOException {
Map<String, String> envs = super.setupKernelEnv();
if (useBuiltinPy4j) {
//TODO(zjffdu) don't do hard code on py4j here
File py4jDestFile = new File(kernelWorkDir, "py4j-src-0.10.7.zip");
File py4jDestFile = new File(kernelWorkDir, "py4j-src-0.10.9.7.zip");
FileUtils.copyURLToFile(getClass().getClassLoader().getResource(
"python/py4j-src-0.10.7.zip"), py4jDestFile);
"python/py4j-src-0.10.9.7.zip"), py4jDestFile);
if (additionalPythonPath != null) {
// put the py4j at the end, because additionalPythonPath may already contain py4j.
// e.g. IPySparkInterpreter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public InterpreterResult interpret(String st, InterpreterContext context)
":/_zeppelin ";

// set PYTHONPATH
String pythonPath = ".:/_python_workdir/py4j-src-0.10.7.zip:/_python_workdir";
String pythonPath = ".:/_python_workdir/py4j-src-0.10.9.7.zip:/_python_workdir";

setPythonCommand("docker run -i --rm " +
mountPythonScript +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private void createPythonScript() throws IOException {
copyResourceToPythonWorkDir("python/zeppelin_context.py", "zeppelin_context.py");
copyResourceToPythonWorkDir("python/backend_zinline.py", "backend_zinline.py");
copyResourceToPythonWorkDir("python/mpl_config.py", "mpl_config.py");
copyResourceToPythonWorkDir("python/py4j-src-0.10.7.zip", "py4j-src-0.10.7.zip");
copyResourceToPythonWorkDir("python/py4j-src-0.10.9.7.zip", "py4j-src-0.10.9.7.zip");
}

protected boolean useIPython() {
Expand All @@ -217,7 +217,7 @@ protected Map<String, String> setupPythonEnv() throws IOException {
Map<String, String> env = EnvironmentUtils.getProcEnvironment();
appendToPythonPath(env, pythonWorkDir.getAbsolutePath());
if (useBuiltinPy4j) {
appendToPythonPath(env, pythonWorkDir.getAbsolutePath() + "/py4j-src-0.10.7.zip");
appendToPythonPath(env, pythonWorkDir.getAbsolutePath() + "/py4j-src-0.10.9.7.zip");
}
LOGGER.info("PYTHONPATH: {}", env.get("PYTHONPATH"));
return env;
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit f42943c

Please sign in to comment.