Skip to content

Source Code Deployment

It is recommended to use uv for installation. If you do not have uv yet, please check the official installation guide.

Windows users can also check this method to install uv and ffmpeg.

  1. Pre-installation of Tools on MacOS/Linux

    MacOS users need to execute the following commands to install relevant libraries:

    brew install libsndfile
    
    brew install ffmpeg
    
    brew install git
    
    brew install [email protected]

    Linux users need to install ffmpeg using the command sudo yum install -y ffmpeg or apt-get install ffmpeg.

  2. Create a folder with no spaces or Chinese characters in its name, enter this folder in the terminal, and then execute the following commands:

    git clone https://github.com/jianchang512/pyvideotrans
    cd pyvideotrans

    Alternatively, you can go directly to https://github.com/jianchang512/pyvideotrans, click the green Code button to download the source code, unzip it, and enter the directory where sp.py is located.

  3. Execute the command uv sync to install modules. Depending on network conditions, this may take a few to several minutes. Users in mainland China can use a mirror to speed up installation using the command: uv sync --index https://mirrors.aliyun.com/pypi/simple/

  4. Execute the command uv run sp.py to open the software interface.

Source Code Deployment Issues

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

uv remove ctranslate2

uv add ctranslate2==3.24.0