Source Code Deployment
Windows users can also refer to this method to install uv and ffmpeg.
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 python@3.10For Linux, install
ffmpegusing the commandsudo yum install -y ffmpegorapt-get install ffmpeg.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 pyvideotransAlternatively, 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.Execute the command
uv syncto 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/Execute the command
uv run sp.pyto open the software interface.
Notes on Source Code Deployment
- 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