Skip to content

Source Code Deployment on Windows 10/11

  1. Open https://www.python.org/downloads/ to download Python 3.10 for Windows. After downloading, double-click the installer and proceed with the installation (click 'Next'). Be sure to check the "Add Python 3.10 to PATH" option.

    Open a Command Prompt (cmd) and run python -V. If the output is not Python 3.10.x, the installation was unsuccessful or Python was not added to the PATH. Please reinstall.

  2. Open https://github.com/git-for-windows/git/releases/ to download Git. After downloading, double-click the installer and proceed with the default options ('Next').

  3. Choose a folder with a path that contains no spaces or Chinese characters. In the File Explorer address bar for that folder, type cmd and press Enter to open a terminal. All subsequent commands should be executed in this terminal.

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

  5. Then, run: cd pyvideotrans

  6. Continue by running: python -m venv venv

  7. Next, run the command .\venv\scripts\activate. After execution, confirm that your command prompt line now starts with (venv). If it doesn't, an error has occurred.

  8. Run pip install -r requirements.txt.

  9. If you want to use CUDA acceleration, run the following commands:

pip uninstall -y torch torchaudio
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121
  1. On Windows, to enable CUDA acceleration, you must have an NVIDIA graphics card and have the CUDA 11.8+ environment configured. For detailed installation instructions, see CUDA Acceleration Support.

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

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

Troubleshooting Source Code Deployment

  1. By default, this project uses ctranslate2 version 4.x, which only supports CUDA 12.x. If your CUDA version is lower than 12 and you cannot upgrade, please uninstall ctranslate2 and reinstall a compatible version with the following commands:
pip uninstall -y ctranslate2
pip install ctranslate2==3.24.0
  1. You might encounter errors like xx module not found. If this happens, open requirements.txt, find the line for the xx module, and remove the version specifier (the == and the version number that follows).