I have a python script that is running in virtual environment. I needed this code to invoke another python script. For that I used subprocess.call(['python', 'python_script.py'])
, but the python_script is stuck at the imports, because it is running outside the virtual environment, and some of the modules are only available in venv.
What should I do to call subprocess and stay inside venv?
(BTW, I'm using Windows right now, but I am looking for a cross-platform solution)
EDIT: As I understood that behaviour I wanted was the default one, I've just deleted virtual environment and created the new one. Surprisingly, it worked. Still have no idea what was happening with the old venv, though