Skip to content

Window10/11 Source Code Deployment

  1. Open https://www.python.org/downloads/ to download windows3.12, after downloading, double-click and proceed with next all the way, making sure to select "Add to PATH".

    Open a cmd, execute python -V, if the output is not 3.12.3, it means that the installation is wrong, or "Add to PATH" is not added, please reinstall.

  2. Open https://github.com/git-for-windows/git/releases/, download git, double-click and proceed with next all the way after downloading.

  3. Find a folder that does not contain spaces and Chinese, enter cmd in the address bar and press Enter to open the terminal. The following commands are executed in this terminal.

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

  5. Continue to execute the command cd pyvideotrans

  6. Continue to execute python -m venv venv

  7. Continue to execute the command .\venv\scripts\activate. After execution, please check and confirm that the beginning of the command line has changed to (venv), otherwise it means an error.

  8. Execute pip install -r requirements.txt. If it prompts a failure, execute the following 2 commands to switch the pip mirror to Alibaba mirror:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
Then re-execute. If you have switched to the Alibaba mirror source and it still prompts a failure, please try executing `pip install -r requirements.txt`
  1. If you want to use CUDA acceleration, execute the following respectively:
pip
pip install torch==2.2.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
  1. Windows: To enable CUDA acceleration, you must have an NVIDIA graphics card and have configured the CUDA11.8+ environment. See CUDA Acceleration Support for specific installation.

  2. Extract ffmpeg.zip to the current source code directory. If prompted to overwrite, overwrite it. After extracting, make sure that ffmpeg.exe, ffprobe.exe, and ytwin32.exe can be seen in the ffmepg folder under the source code.

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

Source Code Deployment Problem Description

  1. The default is to use ctranslate2 version 4.x, which only supports CUDA12.x. If your CUDA is lower than 12 and you cannot upgrade CUDA to 12.x, please 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 such as xx module not found. Please open requirements.txt, search for the xx module, and then remove the == and the version number after it from xx.