Skip to content

Source Code Deployment

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

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

  1. Pre-installation for MacOS/Linux

    For MacOS, execute the following commands to install the required libraries:

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

    For Linux, install ffmpeg using the command sudo yum install -y ffmpeg or apt-get install ffmpeg.

  2. Create a folder without spaces or Chinese characters. Open a terminal, navigate to this folder, and execute the following commands:

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

    Alternatively, you can go to https://github.com/jianchang512/pyvideotrans, click the green Code button to download the source code, extract it, and then navigate to the directory containing sp.py.

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

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

Notes on Source Code Deployment

  1. By default, it uses ctranslate2 version 4.x, 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 then reinstall it:

uv remove ctranslate2

uv add ctranslate2==3.24.0