通过豆瓣源下载库时出现“Cannot unpack file ”问题,可以考虑换源下载

!pip install librosa  https://pypi.douban.com/simple

通过上述豆瓣源下载,显示如下错误


DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  ERROR: Cannot unpack file c:\users\zx305\appdata\local\temp\pip-unpack-hlcv_h\simple.html (downloaded from c:\users\zx305\appdata\local\temp\pip-req-build-yryalj, content-type: text/html); cannot detect archive format
ERROR: Cannot determine archive format of c:\users\zx305\appdata\local\temp\pip-req-build-yryalj

可以替换为如下格式

pip install <包名> -i https://pypi.douban.com/simple
上面使用的是豆瓣源,下面是其他国内源,替换上面的地址即可,都很快,随便用哪个。
# 阿里云 http://mirrors.aliyun.com/pypi/simple/
# 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
# 豆瓣(douban) http://pypi.douban.com/simple/
# 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 
# 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

上述方法依旧存在解决不了的可能,后续通过一定手段规避了这一问题,但具体方法记不得了

你可能感兴趣的:(通过豆瓣源下载库时出现“Cannot unpack file ”问题,可以考虑换源下载)