问题
I tried to unzip large zipfiles from my Drive into my Colab and got this error:
BadZipFile: zipfiles that span multiple disks are not supported
How do I unzip large files from Drive into Colab?
回答1:
Im doing that with two options:
!unzip file_location -d file_destination #-d is for quite option.
Or other option more elaborate:
import zipfile
from google.colab import drive
drive.mount('/content/drive/')
zip_ref = zipfile.ZipFile("/content/drive/My Drive/ML/DataSet.zip", 'r')
zip_ref.extractall("/tmp")
zip_ref.close()
来源:https://stackoverflow.com/questions/60143107/how-do-i-unzip-large-files-1gb-from-my-drive-into-colab