jupyter 解压缩zip文件
解压到当前目录
!unzip example.zip
# 或者指定解压路径
!unzip example.zip -d ./target_folder
方法二:
import zipfile
# 指定要解压的 zip 文件路径
zip_path = 'example.zip'
# 指定解压到的目标文件夹
extract_path = './extracted_folder'
# 解压
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
zip_ref.extractall(extract_path)

浙公网安备 33010602011771号