错误:BadZipFile:安装django-libsass时文件不是zip文件

时间:2018-01-19 05:27:22

标签: python django pip install

我使用python3创建一个虚拟环境。我安装了django和一些软件包。有用。但是在安装django-libsass时,会引发错误BadZipFile: File is not a zip

Collecting django-libsass
Exception:
Traceback (most recent call last):
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/download.py", line 809, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/download.py", line 715, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/utils/__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/home/ubuntu/new_env/lib/python3.5/site-packages/pip/utils/__init__.py", line 484, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib/python3.5/zipfile.py", line 1026, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.5/zipfile.py", line 1093, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

我不知道为什么,任何人都会帮助我! 谢谢!

0 个答案:

没有答案
相关问题