Skip to content

Windows 10/11 Source Code Deployment

  1. Open https://www.python.org/downloads/ and download windows 3.12. Double-click the downloaded file and click "Next" throughout the installation process. Make sure to select "Add to PATH".

    Open a cmd window and execute python -V. If the output is not 3.12.3, it indicates an installation error or that "Add to PATH" was not selected. Please reinstall.

  2. Open https://github.com/git-for-windows/git/releases/download/v2.45.0.windows.1/Git-2.45.0-64-bit.exe, download git, and double-click to install it.

  3. Find a folder without spaces or Chinese characters in its path. Enter cmd in the address bar and press Enter to open a terminal. All the following commands should be executed in this terminal.

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

  5. Execute the command cd pyvideotrans

  6. Execute python -m venv venv

  7. Execute the command .\venv\scripts\activate. After execution, please check and confirm that the command line prefix has changed to (venv); otherwise, an error has occurred.

  8. Execute pip install -r requirements.txt. If it fails, execute the following two commands to switch the pip mirror to the Alibaba mirror:

    
    pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
    pip config set install.trusted-host mirrors.aliyun.com

    Then execute again. If it still fails even after switching to the Alibaba mirror, please try executing pip install -r requirements.txt again.

  9. To use CUDA acceleration, execute the following commands:

    pip uninstall -y torch torchaudio

    pip install torch==2.2.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118

  10. On Windows, to enable CUDA acceleration, you must have an NVIDIA graphics card and a properly configured CUDA 11.8+ environment. For specific installation instructions, see CUDA Acceleration Support

  11. Extract ffmpeg.zip to the current source code directory. If prompted to overwrite files, do so. After extraction, ensure that the ffmpeg folder under the source code directory contains ffmpeg.exe, ffprobe.exe, and ytwin32.exe.

  12. python sp.py to open the software interface.

Source Code Deployment Troubleshooting

  1. By default, ctranslate2 version 4.x is used, which only supports CUDA 12.x. If your CUDA version is lower than 12 and you cannot upgrade it to 12.x, execute the following commands to uninstall ctranslate2 and then reinstall it:

pip uninstall -y ctranslate2

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