Has anyone tried importing Python libraries (e.g. numpy) to Visual Components? Please advise how to do this

Trying to create an application to do some maths inside the model.

From topic: Integration of numpy

Thanks, Unnahi, this is really useful. Is there any available example about calling the external Python 3 shell?

Hi @AssadF

You could use the python subprocess module to call external python interpreter with a given python file as an argument.


import subprocess
process = subprocess.Popen(["C:\Users\USERNAME\AppData\Local\Programs\Python\Python39\python.exe", "C:\Users\XXX\Desktop\MyPythonFile.py"])
1 Like

Sounds really helpful!
Thanks, @Este, really appreciated!