- 报错1:
- 报错:AssertionError: Torch not compiled with CUDA enabled
- 解决:先使用pip将当前具有的torch卸载,然后去pytorch官网复制下载指令
- 报错2:
- 报错:ValueError: too many values to unpack (expected 2)
- 原因:函数返回值的个数和接收值的变量个数不对应
- 报错3:
- 报错:RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat1 in method wrapper_addmm):
- 解决:使用tensor.is_cuda查看是否所有变量都在cuda上,并且要记得把model.to('cuda')
- 报错4:
- 报错:在windows下的git bash中使用wget报错,找不到指令
- 解决:
- 下载wget.exe(下载地址:https://eternallybored.org/misc/)
- 使用where git 查看bin目录位置,将wget.exe放置到bin目录下再使用即可(后续linux中专有指令需要在git bash中使用,感觉都可以使用此方法)
- 报错5:
- 报错:ImportError: Library “GLU“ not found.问题
- 解决:apt-get install python-opengl
- 报错6:
- 报错:ValueError('Failed to initialize Pyglet window with an OpenGL >= 3+ context. If you\'re logged in via SSH, ensure that you\'re running your script with vglrun (i.e. VirtualGL). The internal error message was "Cannot connect to "None""',)
- 解决:加上import os; os.environ['PYOPENGL_PLATFORM'] = 'egl'即可解决
- 报错7:
- 报错:ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyrender 0.1.43 requires PyOpenGL==3.1.0, but you have pyopengl 3.1.6 which is incompatible. - 通用的解决:当包的版本出现冲突时,把所有相关的包都uninstall ,然后再根据逐次进行安装
- 报错:ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
- 报错8:
- 报错:mesa configure: error: Package requirements (expat21) were not met: No package 'expat21' found Con
- 解决:apt-get install libexpat1-dev
- 报错9:
- 报错:Import "tensorflow.keras.utils" could not be resolved
- 解决:更新tensorflow版本 pip install --upgrade tensorflow
- 报错10:
- 报错:torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 23.69 GiB total capacity; 20.91 GiB already allocated; 14.31 MiB free; 22.15 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
- 解决:改小batch_size(有用!!!)
- 报错11:
- 报错:RuntimeError: DataLoader worker (pid 26533) is killed by signal: Bus error. It is possible that dataloader's workers are out of shared memory. Please try to raise your shared memory limit.
- 解决:减少num_workers数量 ,可解决
- 报错12:
- 报错:Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated co 或者TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your g
- 解决:pip uninstall protobuf
pip install protobuf==3.20.1
- 报错13:
- 报错:The command $ docker-compose could not be found in this WSL 1 distro. We recommend to convert this distro to WSL 2 and activate the WSL integration in Docker Desktop settings.
- 解决:打开docker desktop 设置->resource->wsl 将Ubuntu选项激活->apply && restart
- 报错14:
- 报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- 解决:以管理员身份运行wsl即可解决
- 报错15:
- 首次运行anaconda环境时,报错:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run - 解决:先根据提示初始化shell,比如conda init bash,然后vi ~/.bashrc 增加anaconda3的环境变量,然后source ~/.bashrc 即可看到进入base虚拟环境了
- 首次运行anaconda环境时,报错:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
- 报错16:
- gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive ta
- 原因:有可能是数据还没有下载完成,即看到的压缩包还是和windows上没下载完全的一样,是个临时文件。
- 解决:删除,重新下载
- 报错17:
- 报错 missing: line 81: makeinfo: command not found
- 解决:apt-get install texinfo
- 报错18:
- 报错:PackagesNotFoundError: The following packages are not available from current channels:
- 解决:访问官网查询下载不了的包,看是在哪个channel上,然后将添加那个channel:conda config --append channels channel名字,然后再安装即可成功
报错整理1.24
猜你喜欢
转载自blog.csdn.net/weixin_45647721/article/details/127973764
今日推荐
周排行