Python calling subprocess that requires no virtual environment
问题 I have a Python 3.6 script that calls out to a third-party tool using subprocess. main_script.py: #!/usr/bin/env python import subprocess result = subprocess.run(['third-party-tool', '-arg1'], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) The problem is, main_script.py must be run from within a virtual environment, and third-party-tool must be run from no virtual environment whatsoever. I don't know much about third-party-tool , except that it is on my path. Calling it while I