DDS2M 디노이징 연구 중 에러 발생하였습니다.
fatal error: Python.h: No such file or directory 12
| #include <Python.h> | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
| #include <Python.h> | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
이 에러는 C 또는 C++ 확장을 컴파일하거나 파이썬 관련 라이브러리를 설치할 때, Python 헤더 파일(Python.h)이 없는 경우 발생함.
Python.h는 Python 개발 도구(Development Tools)에 포함되어 있으며, 이를 설치해야 문제를 해결할 수 있음.
sudo apt-get update
sudo apt-get install python3-dev # Python 3.x용
sudo apt-get install python3.9-dev
sudo apt-get update
sudo apt-get install python3-dev # Python 3.x용
sudo apt-get install python3.9-dev
g++ 컴파일러가 설치되어 있어야함.
sudo apt-get install build-essential
'트러블슈팅' 카테고리의 다른 글
ModuleNotFoundError: No module named 'mmcv.cnn' (0) | 2024.11.27 |
---|---|
DINO FM 전이학습 디노이징, 초해상도 등 관련 의문점 (0) | 2024.11.26 |
no module named 'mmcv' (0) | 2024.11.22 |
데이터 입력 사이즈에 따라 positional encoding 차원의 값 변형 문제 (0) | 2024.11.22 |
teacher모델의 입력 변형 문제 (0) | 2024.11.19 |