Procedure for installing python libraries from source

Oh, right - system.util.execute is a 'fire-and-forget', it doesn't give you access to standard output. Try adapting this:

from java.lang import ProcessBuilder, String

pb = ProcessBuilder([r"C:\Users\pgriffith\AppData\Local\Microsoft\WindowsApps\python3.exe", r"C:\Users\pgriffith\Downloads\test.py"])
process = pb.start()
output = String(process.getInputStream().readAllBytes())

print output

(Note: This blocks until the process completes waiting on the input stream. It may or may not ever complete, depending on what you're running, which could block a thread forever. Be careful).

2 Likes