簡體   English   中英

點安裝spacy時按ctrl-c,現在嘗試再次安裝時出現錯誤

[英]Hit ctrl-c during a pip install of spacy, now getting error when attempt to install again

我正在嘗試安裝spacy。 我在CentOS Linux上

!pip install -U spacy

在Jupyter筆記本中,一切工作正常。 在安裝過程中,我意識到我打算包括--user命令,因為我只打算為我的用戶安裝,所以我按了ctrl-c。 至此安裝尚未完成。

現在,無論是否包含--user標志,嘗試使用pip再次安裝軟件包都會給我一個錯誤。 我認為以下錯誤與構建不完整有關。 有誰知道如何解決這一問題?

Collecting spacy
Exception:
Traceback (most recent call last):
File "/opt/anaconda2/lib/python2.7/site-packages/pip/basecommand.py", line 
215, in main
status = self.run(options, args)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/commands/install.py", 
line 335, in run 
wb.build(autobuilding=True)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/wheel.py", line 749, in 
build
self.requirement_set.prepare_files(self.finder)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/req/req_set.py", line 
380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/opt/anaconda2/lib/python2.7/site-packages/pip/req/req_set.py", line 
620, in _prepare_file
session=self.session, hashes=hashes)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/download.py", line 809, 
in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/download.py", line 715, 
in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/opt/anaconda2/lib/python2.7/site-packages/pip/utils/__init__.py", 
line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/opt/anaconda2/lib/python2.7/site-packages/pip/utils/__init__.py", 
line 484, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/opt/anaconda2/lib/python2.7/zipfile.py", line 770, in __init__
self._RealGetContents()
File "/opt/anaconda2/lib/python2.7/zipfile.py", line 811, in _ 
RealGetContents
raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file`

感謝大家。 對我有用的解決方案是轉到$ HOME / .cache / pip並刪除http /和wheels /的內容

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM