Version 4 (modified by 21 months ago) ( diff ) | ,
---|
PyRunner
This is a tool to run python code from Java. The tool requires FULL python to be installed, including pip and venv.
Some python installations require manual post-installation of these. To do this you need something like
sudo apt-get update sudo apt install python3-pip sudo apt install python3.<VERSION>-venv
where <VERSION> is 8,9 etc depending on your python version.
The procedure is roughly:
- create a PythonVenv E, possibly already with the targz code you want to run
- Pass your targz directly into the PythonVenv constructor
- or if you dont have a targz, copy the code into E.
- E.call the code you want to run
- call E.remove to remove the venv
Note:
See TracWiki
for help on using the wiki.