How to create zip64 archive using shutil.make_archive

Question:

Python code snippet which creates creates zip archive file from a folder.

shutil.make_archive(file_path, 'zip', folder_path)

I am getting this error :

Filesize would require ZIP64 extensions.

How to create ZIP64 archive file using shutil.make_archive?

Note: I cannot use zipfile.ZipFile function.

Asked By: Yogesh Dhanapal

||

Answers:

You must be using a Python version prior to 3.4
unfortunately after reading shutil source code on github github . it’s clearly using zipfile.ZipFile from zipfile this is a closed issue now see here python, so Starting from Python 3.4, ZIP64 extensions is availble by default .
But Prior to Python 3.4, make_archive will not create a file with ZIP64 extensions.
If you are using an older version of Python and want ZIP64, you can use the zipfile.ZipFile() directly which you already mentioned .

Answered By: WaLid LamRaoui
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.