Skip to content

Source Code Deployment on Windows 10/11

  1. Go to https://www.python.org/downloads/ to download Python 3.12 for Windows. After downloading, double-click the installer and proceed with the installation, ensuring that you select the "Add to PATH" option.

    Open a command prompt (cmd) and execute python -V. If the output is not 3.12.3, it indicates an installation error or failure to add Python to the PATH. Please reinstall Python.

  2. Go to https://github.com/git-for-windows/git/releases/ to download Git for Windows. After downloading, double-click the installer and proceed with the installation using the default settings.

  3. Choose a folder without spaces or Chinese characters in its path. Type cmd in the address bar and press Enter to open a terminal. Execute the following commands in this terminal.

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

  5. Execute the command: cd pyvideotrans

  6. Execute the command: python -m venv venv

  7. Execute the command: .\venv\scripts\activate. After execution, verify that the command line starts with (venv). If not, it indicates an error.

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

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
Then, try executing `pip install -r requirements.txt` again. If you have already switched to the Alibaba Cloud mirror and it still fails, try executing `pip install -r requirements.txt`
  1. If you want to use CUDA acceleration, execute the following commands respectively:
pip
pip install torch==2.2.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
  1. On Windows, to enable CUDA acceleration, you must have an NVIDIA graphics card and a properly configured CUDA 11.8+ environment. See CUDA Acceleration Support for specific installation instructions.
  2. Extract ffmpeg.zip to the current source code directory. If prompted to overwrite, do so. After extraction, ensure that you can see ffmpeg.exe, ffprobe.exe, and ytwin32.exe within the ffmpeg folder under the source code directory.
  3. python sp.py to open the software interface.

Source Code Deployment Troubleshooting

  1. The default is to use ctranslate2 version 4.x, which only supports CUDA 12.x. If your CUDA version is lower than 12 and you cannot upgrade CUDA to 12.x, execute the command 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. Open requirements.txt, search for the xx module, and remove the == and the version number after xx.