- Today
- Total
목록정리/잡 에러들 (34)
작심삼일
에러 AttributeError: cannot assign module before Module.__init__() call 나는 network를 만들다가 저런 에러를 만났다. 해결 방법 super().__init__() 위 코드를 넣어준다.
에러 IndentationError: unindent does not match any outer indentation level 해결 들여쓰기 오류다. 들여쓰기 시 tab과 space가 섞여있을 때도 발생한다.
에러 cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' 해결 방법 cv2.imread에서 이미지를 잘못 불러온 것이다. 이미지 경로를 잘 썼는지 확인해보길 바란다.
에러 AttributeError: partially initialized module 'cv2' has no attribute '_registermattype' 해결방법 1. 다양하게 깔려있을 수도 있는 opencv를 다 지운다. pip uninstall opencv-python pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless 2. 해당 버전을 설치한다. pip3 install opencv-contrib-python==4.5.5.62
에러 난 docker에서 DistributedSampler같은 distributed어쩌구를 실행시킬 때 오류가 발생했다. (dataloader였나..) OSError: [Errno 28] No space left on device 해결 방법 말만 보면 장치에 남은 공간이 없다는데, 확인해보면 공간이 많다. docker에 할당된 것과, 실제 docker가 돌아가는 부분이 나뉘어있어서 이런 에러가 난다. 해결방안은 두가지가 있다. 1. docker를 생성할 때 docker run 어쩌구 뒤에 아래 커맨드를 붙인다. # docker 생성 시 --ipc=host 2. num_worker를 0으로 한다. num_workers=0
에러 단순히 pip -r requirements.txt를 실행시켰는데 이런 에러가 나온다. ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. PyYAML을 삭제 후 다른 버전으로 재설치할 때 생기는 오류다. 해결방법 PyYAML을 무시하고 PyYAML을 재설치한 뒤, 다시 다른 것들을 설치하면 해결된다. pip install --ignore-installed PyYAML 물론 이 방법이 찜찜할 것이다. 하지만 더 좋은 방법을 아직 찾지..
에러 opencv를 설치한 후에 import cv2를 하면 다음과 같은 에러를 만날 때가 있다. ImportError: libGL.so.1: cannot open shared object file: No such file or directory 해결 방법 apt-get install libgl1-mesa-glx 위 커맨드를 실행하면 된다. 만약 위 커맨드를 실행할 때 에러가 난다면 아래 명령어로 apt-get을 업데이트 해보자. apt-get update
에러 CUDA버전이 맞지 않을때 나타나는 에러다. Pytorch를 재설치하면 된다. CUDA 11.3 버전 설치 # conda conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch # pip pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 PyTorch An open source machine learning framework that accelerates the path from research prototyping to production deployment. pytorch.org 혹은 위 페이지에..