simplify your script like following .
@echo off chcp 65001 python -m venv test call test\Scripts\activate pip install -r requirements.txt python xxxx.py