-2

I have a virtual environment called neqsimvenv.

In this environment I want to run neqsim, which is dependent on running java 11 or higher. But I am not able to run neqsim in a .py script in that environment.

I have used install -c conda-forge openjdk to get java, and when I connect the virtual environment to jupyter notebooks in VS Code, it works fine. If I do: java -version, I get the following message displayed in Image 1 in anaconda prompt. Image 1 I get the same message if I do

import subprocess
subprocess.check_output(['java','-version'],stderr=subprocess.STDOUT)

in the notebook. The notebook can run neqsim just fine.

HOWEVER; if I do

import subprocess
subprocess.check_output(['java','-version'], stderr=subprocess.STDOUT)

in the debug console, when attempting to run a .py script, I get the contents of Image 3 Image 3. And neqsim does not work from the script.

So I don't know what has gone wrong, but could it be the connection to the virtual environment somehow?

Coding thermodynamist
  • 1,340
  • 1
  • 10
  • 18
Lea
  • 1
  • 1
    To improve your question and get a higher chance of reply, please copy paste your script output as text and not as image (you can even format the text in blocks starting and ending by ``` (3 `) – Coding thermodynamist Aug 09 '23 at 14:29

0 Answers0