Hello. I am writing in python 3.4 and flask my own small service with engineering calculations. It took the use of a third-party application GMSH, which starts through pygmsh through the subprocess.
cmd = [gmsh_executable, '-3', filename, '-o', outname] if optimize: cmd += ['-optimize'] out = subprocess.check_output(cmd, stderr=subprocess.STDOUT) Given that the web server is working through the www-data user from the virtual environment, I get the error "PermissionError: [Errno 13] Permission denied" when the subprocess calls python 3.4 from the global root-accessible environment.
Tell me, please, how can I run a subprocess through a virtual environment, without going to root? With python for now, unfortunately.
gmsh_executable? (if it is a Python script, then show it first line (shebang#!) What does global environment mean? How does it differ from non-global environment? - jfs