报错整理(1.25)

  1. 报错1:
    1. 报错:gcc: error trying to exec 'cc1plus': execvp: No such file or directory
      error: command '/usr/bin/nvcc' failed with exit status 1
    2. 解决:apt-get install g++
  2. 报错2:
    1. 报错:add-apt-repository:找不到命令
    2. 解决:
      apt-get install python-software-properties
      apt-get install software-properties-common
      apt-get update
  3. 报错3:
    1. 报错:Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    2. 解决:
      1. 法一:
        apt --fix-broken install
        apt-get update
        apt-get upgrade
      2. 法二(如果法一解决不了):apt remove最左边的package
  4. 报错4:
    1. 报错:ValueError: not enough values to unpack (expected 3, got 2)
    2. 原因:调用的函数返回值只有两个,但设置了三个变量在接收
  5. 报错5:
    1. 报错:torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 23.70 GiB total capacity; 21.89 GiB already allocated; 6.12 MiB free; 22.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.
    2. 解决:将模型推理放置到“with torch.no_grad():” 下
  6. 报错6:
    1. 报错:Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated co
    2. 解决:
      pip uninstall protobuf
      pip install protobuf==3.20.1
  7. 报错7:
    1. 报错:ModuleNotFoundError: No module named 'numba.decorators'
    2. 解决:升级librosa的版本即可
      pip uninstall librosa
      pip install librosa=0.9.2
  8. 报错8:
    1. 当出现报错:RuntimeError('CUDA error: device-side assert triggered\nCUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1.')
    2. 原因:因为在gpu上出错,无法定位,可以设置device='cpu',先定位错误
  9. 报错9:
    1. 报错:tar: ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.quarantine'
    2. 这个报错可以不用管,主要原因是压缩包是在mac系统上压缩的,在linux系统解压会生成一些无法识别的信息,问题不大
  10. 报错10:
    1. 报错:ImportError: cannot import name 'Batch' from 'torchtext.data' (C:\ProgramData\Anaconda3\lib\site-packages\torchtext\data\__init__.py)
    2. 原因:pytorch-lightening 和pytorch的版本不兼容
    3. 解决:使用pip uninstall 卸载当前安装版本,然后不指定版本重新安装pytorch-lightening
  11. 报错11:
    1. 报错:KeyError: '\x00'
    2. 解决:把空行去掉
  12. 报错12:
    1. 报错:TqdmWarning: IProgress not found. Please update jupyter and ipywidgets.
    2. 解决:pip install ipywidgets
  13. 报错13:
    1. 报错:-bash: /bin/mv: Argument list too long
    2. 原因:要移动的文件太多
    3. 解决:
      find sourcePath/ -name "*.txt"  -exec mv {} targetPath/  \;
      #or
      find sourcePath/ -type f  -exec mv {} targetPath/  \;
      

猜你喜欢

转载自blog.csdn.net/weixin_45647721/article/details/128758252