当前位置:   article > 正文

【torch环境】zipfile.BadZipFile: Bad CRC-32 for file ‘torch/lib/libtorch_cuda_cpp.so‘_torch attributeerror 'colorvisuals crc

torch attributeerror 'colorvisuals crc

ERROR: Exception:
Traceback (most recent call last):
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 390, in run
    installed = install_given_reqs(
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 73, in install_given_reqs
    requirement.install(
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 758, in install
    install_wheel(
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 794, in install_wheel
    _install_wheel(
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 637, in _install_wheel
    file.save()
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 406, in save
    shutil.copyfileobj(f, dest)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/shutil.py", line 205, in copyfileobj
    buf = fsrc_read(length)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/zipfile.py", line 940, in read
    data = self._read1(n)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/zipfile.py", line 1030, in _read1
    self._update_crc(data)
  File "/home/guest/anaconda3/envs/mmdet/lib/python3.8/zipfile.py", line 958, in _update_crc
    raise BadZipFile("Bad CRC-32 for file %r" % self.name)

zipfile.BadZipFile: Bad CRC-32 for file 'torch/lib/libtorch_cuda_cpp.so'

【解决方法】

使用参数--no-cache即可解决

pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html --no-cache

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/220550
推荐阅读
相关标签
  

闽ICP备14008679号