Optapy error with getting the rigth JAVA version and couldn't get source code in a ipynb

125 Views Asked by At

I am trying to use the library optapy with a conda environment created locally. I have installed all of the libraries I needes to, also installed Java JDK-17.0.6.10 and created a JAVA-HOME variable. But when I try to run and try to use optapy it doesn't let me and all I get is a big error where it says the OSError: could not get source code.

pd: I'm using python 3.9

error message error message 2

I hope someone can help me with this problem and tell me what to do

1

There are 1 best solutions below

0
Christopher Chianelli On

From the top error message, it appears Java 8 is being used; OptaPlanner and OptaPy require Java 11. The environment variable that need to be set is JAVA_HOME, not JAVA-HOME; ensure JAVA_HOME is set to the path where Java JDK-17.0.6.10 is installed.