Skip to content

Source Code Deployment on Windows 10/11

  1. Visit https://www.python.org/downloads/ to download Python 3.10 for Windows. After downloading, double-click the installer and proceed with "Next" through the steps. Important: Ensure you select "Add to PATH" during the installation.

    Open a command prompt (cmd) and execute python -V. If the output is not 3.10, the installation is either faulty or "Add to PATH" wasn't selected. Reinstall Python, ensuring "Add to PATH" is checked.

  2. Go to https://github.com/git-for-windows/git/releases/ to download Git for Windows. Double-click the downloaded file and proceed with "Next" through the installation steps.

  3. Choose a folder path without spaces or Chinese characters. In the address bar of that folder, type cmd and press Enter to open a terminal within that directory. The following commands will be executed in this terminal.

  4. Execute the command git clone https://github.com/jianchang512/pyvideotrans

  5. Next, execute cd pyvideotrans

  6. Execute python -m venv venv

  7. Execute .\venv\scripts\activate. Verify that the command line now starts with (venv). If not, something went wrong.

  8. Execute pip install -r requirements.txt. If this fails, switch your pip mirror to the Alibaba mirror by running the following two commands:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
Then, retry `pip install -r requirements.txt`. If you've already switched to the Alibaba mirror and it still fails, try `pip install -r requirements.txt` again.
  1. If you want to use CUDA acceleration, execute the following commands respectively:
pip uninstall -y torch torchaudio

pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu126
  1. On Windows, to enable CUDA acceleration, you must have an NVIDIA graphics card and have configured the CUDA 12.x environment. See CUDA Acceleration Support for specific installation instructions.

  2. Extract the contents of ffmpeg.zip into the current source code directory. If prompted to overwrite, choose to overwrite. After extraction, ensure that you can see ffmpeg.exe and ffprobe.exe inside the ffmpeg folder within the source code directory.

  3. python sp.py to launch the software interface.

Source Code Deployment - Troubleshooting

  1. The default version of ctranslate2 is 4.x, which only supports CUDA 12.x. If your CUDA version is lower than 12 and you cannot upgrade to 12.x, uninstall ctranslate2 and reinstall version 3.24.0:
pip uninstall -y ctranslate2

pip install ctranslate2==3.24.0
  1. You might encounter errors like xx module not found. Open requirements.txt, search for the xx module, and remove the == and the version number after it.

  2. Detailed Python 3.10 installation tutorial for Windows can be found here