![]() The rarfile module is basically nothing more than a wrapper around subprocess anyway. You can just use the subprocess module: import subprocess If you are just doing extract_all then there is no need to use a rarfile module, though. Note the use of rf.extract_all(), not rf.rarfile.extract_all(). Then your code should look something like this: import rarfile Some newer RAR files will not extract with bsdtar. Note that bsdtar does not have the same level of support for RAR files that Unrar does. For example on Debian-based systems (this includes Ubuntu) run, sudo apt install bsdtar Do not install these with Pip, you have to install these with your Linux package manager (or install them yourself, if you think that the computer's time is more valuable than your time). Your only two choices are bsdtar or unrar. ![]() In order to get the rarfile Python module to work, you have to also install a supported tool for extracting RAR files. Support for RAR files in general is quite poor, this experience is par for the course. ![]()
0 Comments
Leave a Reply. |