简体   繁体   English

zipfile.BadZipFile:文件不是 zip 文件

[英]zipfile.BadZipFile: File is not a zip file

I am installing Prodigy,我正在安装 Prodigy,

( a software for data annotation). (一款数据标注软件)。 I am using windows 10, Python 3.7.我使用的是 Windows 10,Python 3.7。 pip is updated I need to use wheel python: pip 已更新我需要使用轮 python:

https://github.com/MacPython/wiki/wiki/Spinning-wheels https://github.com/MacPython/wiki/wiki/Spinning-wheels

when I write in my anaconda : ''' pip install prodigy-1.7.1-cp35.cp36.cp37-cp35m.cp36m.cp37m-win_amd64.whl ''' (based on instruction in website)当我在我的 anaconda 中写:''' pip install prodigy-1.7.1-cp35.cp36.cp37-cp35m.cp36m.cp37m-win_amd64.whl '''(基于网站上的说明)

https://prodi.gy/docs/ https://prodi.gy/docs/

I faced with this error (zipfile.BadZipFile: File is not a zip file)我遇到了这个错误(zipfile.BadZipFile: File is not a zip file)

''' 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 ''' 错误:异常:回溯(最近一次调用):文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\cli\\base_command.py”,第 178 行,主状态 = self。 run(options, args) 文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\commands\\install.py”,第352行,运行resolver.resolve(requirement_set)文件“c:\\users\\ moha\\anaconda3\\lib\\site-packages\\pip_internal\\resolve.py”,第 131 行,在解析 self._resolve_one(requirement_set, req) 文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\resolve .py”,第 294 行,在 _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) 文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\resolve.py”,第 242 行,在 _get_selftract.require_dist_shes “c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\operations\\prepare.py”,第 353 行,prepare_linked_requirement progress_bar=self.progress_bar 文件“c:\\users\\moha\\anaconda3\\lib\\site-包\\pip_internal\\download.py”,第 873 行,解压_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 ''' _url unpack_file_url(link, location, download_dir, hashes=hashes) 文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\download.py”, line 807, in unpack_file_url unpack_file(from_path, location, content_type,链接)文件“c:\\users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\utils\\misc.py”,第 628 行,在 unpack_file flatten=not filename.endswith('.whl') 文件“c:\\ users\\moha\\anaconda3\\lib\\site-packages\\pip_internal\\utils\\misc.py”,第 505 行,在 unzip_file 中 zip = zipfile.ZipFile(zipfp, allowZip64=True) 文件“c:\\users\\moha\\anaconda3\\lib \\zipfile.py”,第 1222 行,在 init self._RealGetContents() 文件“c:\\users\\moha\\anaconda3\\lib\\zipfile.py”,第 1289 行,在 _RealGetContents 中引发 BadZipFile(“文件不是 zip 文件” ) zipfile.BadZipFile: 文件不是 zip 文件 '''

can anyone let me know what should I do?谁能让我知道我该怎么办?

This exception means that there was a problem reading the package source file when installing.此异常表示安装时读取包源文件出现问题。 Although they are referred as wheels they are actually zip files.尽管它们被称为轮子,但它们实际上是 zip 文件。

There are many reasons why you might see this exception.您可能会看到此异常的原因有很多。 The most common reason is that there was a problem with downloading/storing.最常见的原因是下载/存储出现问题。

The most common solution is to try install again.最常见的解决方案是再次尝试安装。 This might need removing old download in some cache.这可能需要删除某些缓存中的旧下载。 Read logs to see where the cache is.读取日志以查看缓存的位置。 You can also look for the the file by its name.您还可以按文件名查找文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 zipfile.BadZipFile:使用“openpyxl”引擎时,文件不是 zip 文件 - zipfile.BadZipFile: File is not a zip file when using "openpyxl" engine raise BadZipFile(“文件不是 zip 文件”) zipfile.BadZipFile: 文件不是 zip 文件 - raise BadZipFile(“File is not a zip file”) zipfile.BadZipFile: File is not a zip file 从网站下载和解压 zip 文件时出错 Error: zipfile.BadZipFile: File is not a zip file - Error when downloading and unpacking zip file from website Error: zipfile.BadZipFile: File is not a zip file python django 1.7.6使用模板启动新项目:zipfile.BadZipfile:文件不是zip文件 - python django 1.7.6 start a new project with a template: zipfile.BadZipfile: File is not a zip file 合法的.xlsx 文件上的 openpyxl load_workbook() 导致 zipfile.BadZipFile 错误 - openpyxl load_workbook() on a legit .xlsx file leads to a zipfile.BadZipFile error zipfile.BadZipFile:提取受密码保护的 .zip 和 .zip 时出现错误的 CRC-32 在提取时损坏 - zipfile.BadZipFile: Bad CRC-32 when extracting a password protected .zip & .zip goes corrupt on extract BadZipFile:文件不是zip文件 - BadZipFile: File is not a zip file python zipfile.BadZipfile:截断的中央目录 - python zipfile.BadZipfile: Truncated central directory Python无法处理zipfile.BadZipFile中的异常 - Python cant handle exceptions from zipfile.BadZipFile 解压缩文件导致“BadZipFile:文件不是 zip 文件” - unzipping file results in "BadZipFile: File is not a zip file"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM