I am trying to run a file in the back ground to keep the computer from going to sleep
Main file:
from sub process import Popen
import sys
script_path = 'C:\\Users\\PycharmProjects\\Flash_Cycle'
sys.path.append(script_path)
def test_Popen():
stay_awake = Popen(['python', script_path + '\\stay_awake.py'])
print(stay_awake)
Background file:
import pyautogui
import time
print('sub process started')
while True:
pyautogui.press('numlock')
time.sleep(0.1)
pyautogui.press('numlock')
time.sleep(60)
The error I am getting is
ModuleNotFoundError: No module named 'pyautogui'