- Today
- Total
목록정리 (106)
작심삼일
Ubuntu에서 현재 컴퓨터의 cpu와 gpu 모델을 확인하고 싶다면 터미널에서 다음 커맨드를 입력하면 된다. CPU cat /proc/cpuinfo GPU nvidia-smi --query | fgrep 'Product Name'
에러 E: Unable to locate package libgl1-mesa-glx 해결 방법 apt-get update && apt-get install libgl1
에러 ImportError: cannot import name 'Roboto' from 'fonts.ttf' (/opt/conda/lib/python3.8/site-packages/fonts/ttf/__init__.py) 해결 방법 pip install font-roboto
에러 ImportError: cannot import name 'rank_zero_only' from 'pytorch_lightning.utilities.distributed' (/opt/conda/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py) 해결 방법 rank_zero 함수의 위치가 바껴서 그렇다. rank_zero를 import하는 위치를 바꿔주면 된다. from pytorch_lightning.utilities.distributed import rank_zero_only # 위 코드를 아래로 수정 from pytorch_lightning.utilities.rank_zero import rank_zero_only
에러 ModuleNotFoundError: No module named 'git' 해결 방법 pip install gitpython
코드 mediapipe.solution의 face_detection을 사용한다. face_detection.process를 진행하면 여러 데이터들이 나오는데, 그 중 bounding box만 뽑기 위해서는 아래와 같이 results.detections[0].location_data.relative_bounding_box을 사용한다. import mediapipe as mp import cv2 mp_face_detection = mp.solutions.face_detection face_detection = mp_face_detection.FaceDetection(model_selection=1, min_detection_confidence=0.5) img_path = './gunter.png' img =..
에러 AttributeError: module 'numpy' has no attribute 'object'. 해결 방법 numpy 1.24.*버전에서 문제가 나는 것으로 짐작하고 있다. 다운그레이드 해주면 해결된다. pip install numpy==1.23.4
에러 ImportError: numpy.core.multiarray failed to import 해결 방법 numpy 버전을 업그레이드 한다. pip install -U numpy 그러면 이렇게 성공적으로 업그레이드 된다. Successfully installed numpy-1.24.2 하지만 난 그랬더니 이런 에러를 또 만났다. AttributeError: module 'numpy' has no attribute 'object'. 그래서 numpy 버전을 다운그레이드 해줬더니 최종적으로 해결됐다. pip install numpy==1.23.4