Source Code Deployment on Windows 10/11
Go to
https://www.python.org/downloads/to download Python 3.10 for Windows. After downloading, double-click the installer and proceed by clicking "Next." Make sure to check "Add to PATH."Open a command prompt and run
python -V. If the output is not3.10, it indicates an installation error or failure to add Python to PATH. Please reinstall.Go to
https://github.com/git-for-windows/git/releases/to download Git. After downloading, double-click the installer and follow the setup steps.Navigate to a folder without spaces or Chinese characters. Type
cmdin the address bar and press Enter to open a terminal. Execute all the following commands in this terminal.Run the command:
git clone https://github.com/jianchang512/pyvideotransContinue with:
cd pyvideotransThen run:
python -m venv venvNext, execute:
.\venv\scripts\activate. After running, check that the command prompt now starts with(venv). If not, an error has occurred.Run
pip install -r requirements.txt. If it fails, execute the following two commands to switch the pip mirror to Alibaba's mirror:
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.comThen retry. If it still fails after switching to the Alibaba mirror, try running pip install -r requirements.txt.
- To enable CUDA acceleration, run the following commands separately:
pip uninstall -y torch torchaudio
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu126On Windows, to use CUDA acceleration, you must have an NVIDIA GPU and a configured CUDA 12.x environment. For installation details, see CUDA Acceleration Support.
Extract
ffmpeg.zipinto the current source code directory. Overwrite if prompted. After extraction, ensure thatffmpeg.exeandffprobe.exeare visible in theffmpegfolder under the source code.Run
python sp.pyto open the software interface.
Source Code Deployment Issues
- By default, ctranslate2 version 4.x is used, which only supports CUDA 12.x. If your CUDA version is below 12 and you cannot upgrade to 12.x, run the following commands to uninstall ctranslate2 and reinstall an older version:
pip uninstall -y ctranslate2
pip install ctranslate2==3.24.0If you encounter errors like
xx module not found, openrequirements.txt, search for thexxmodule, and remove the==and the version number after it.For a detailed tutorial on installing Python 3.10 on Windows, see
