ninia / jep

Embed Python in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an include path at runtime

RevolvingMadness opened this issue · comments

Describe the problem
I know how to add an include path with JepConfig but I don't know how to add an include path at runtime.

Environment (please complete the following information):

  • OS Platform, Distribution, and Version: Windows, 11, 4.1.1
  • Python Distribution and Version: 3, 3.11
  • Java Distribution and Version: OpenJDK, 17
  • Jep Version: 4.1.1
  • Python packages used (e.g. numpy, pandas, tensorflow): None

You can append additional paths to sys.path in a jep interpreter the same way you would in an ordinary python interpreter. Try using interpreter.exec to execute some python statements that manipulate sys.path.

Ok, I'll try that.

That worked. Thank you!