我需要使用 Python3 在 Google Colab 中解压缩 .rar 文件。首先,我尝试在 MacOS 中进行本地化。
我已经安装了 Patoolib 包:
pip install patool
和 unrar 解压缩 .rar 文件
brew install unrar
然后,在我的 python 脚本中,我这样做:
import patoolib
patoolib.extract_archive("data_2/Peliculas.rar", outdir="/data_2")
我收到以下错误:
PatoolError: could not find an executable program to extract format rar; candidates are (rar,unrar,7z),
我需要将 Patool 配置为使用 unrar,但没有可用的文档。有人知道如何解决这个错误吗?