Window10/11 Source Code Deployment
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 not3.12.3
, it means that the installation is wrong, or "Add to PATH" is not added, please reinstall.Open
https://github.com/git-for-windows/git/releases/
, download git, double-click and proceed with next all the way after downloading.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.Execute the command
git clone https://github.com/jianchang512/pyvideotrans
Continue to execute the command
cd pyvideotrans
Continue to execute
python -m venv venv
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.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`
- If you want to use CUDA acceleration, execute the following respectively:
pip install torch==2.2.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
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.
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.
python sp.py
to open the software interface.
Source Code Deployment Problem Description
- 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
- 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.