zipfile.BadZipFile: File is not a zip file

I tried to install prodigy, unfortunately, I have this error in below, I am using windows 10, Python 3.7. pip is updated and I am using

pip install prodigy-1.7.1-cp35.cp36.cp37-cp35m.cp36m.cp37m-win_amd64.whl

win_amd64 is based in my machine information, can you let me know what should I do?

ERROR: Exception: Traceback (most recent call last): File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\cli\base_command.py”, line 178, in main status = self.run(options, args) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\commands\install.py”, line 352, in run resolver.resolve(requirement_set) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\resolve.py”, line 131, in resolve self._resolve_one(requirement_set, req) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\resolve.py”, line 294, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\resolve.py”, line 242, in _get_abstract_dist_for self.require_hashes File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\operations\prepare.py”, line 353, in prepare_linked_requirement progress_bar=self.progress_bar File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\download.py”, line 873, in unpack_url unpack_file_url(link, location, download_dir, hashes=hashes) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\download.py”, line 807, in unpack_file_url unpack_file(from_path, location, content_type, link) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\utils\misc.py”, line 628, in unpack_file flatten=not filename.endswith(’.whl’) File “c:\users\moha\anaconda3\lib\site-packages\pip_internal\utils\misc.py”, line 505, in unzip_file zip = zipfile.ZipFile(zipfp, allowZip64=True) File “c:\users\moha\anaconda3\lib\zipfile.py”, line 1222, in init self._RealGetContents() File “c:\users\moha\anaconda3\lib\zipfile.py”, line 1289, in _RealGetContents raise BadZipFile(“File is not a zip file”) zipfile.BadZipFile: File is not a zip file

Hi! Based on the error message, it looks like pip fails to extract the contents from the .whl file.

Could you double-check that the file was downloaded correctly and didn’t get corrupted or something similar? After downloading, it should be ~3.4 MB and its sha256 checksum should be 74f22681fe427f634bfb3a051fd2e8a5ec947ee4ee95bb291cf64371c03035e4. You should also be able to rename the .whl file to .zip and open it just like a regular zip archive. If you get different results here, it could indicate that it was corrupted during download.

Dear ines,

wow, many thanks for your prompt response, the file volume is .30k

I have it in my email as

Deleted: prodigy-1.7.1-cp35.cp36.cp37-cp35m.cp36m.cp37m-win_amd64.whl

actually it was also my first thought that the problem is file . I already changed to zip file and It does not work, what should I do ?

This does sound like the file got corrupted somehow? Did you try re-downloading it? You should find the download link in the first email you received from us.

yes, you were right. now it works, hello prodigy!

1 Like