so here is my question:
Script A imports Script B, Script A uses Virtual Environment A and Script B uses Virtual Environment B.
import sys
interpreterPath = "[...]/.env/bin/python"
if sys.executable != interpreterPath:
import subprocess
print("Creating subprocess...")
subprocess.Popen([interpreterPath,__file__])
print("Subprocess has exited.")
else:
############################
### SUBPROCESS START ###
import module
# TODO
The importing of the module after "SUBPROCESS START" works fine, it just does not return functions I define where the "TODO" is located at.
How would I archive this? Thanks for helping.