ubuntu linux

colcon build 오류 : error: option --editable not recognized

우금붕 2025. 6. 20. 10:22

1, 문제 : setup.py가 있는 코드 build가 안됨

2, 오류

Starting >>> <폴더명> 
--- stderr: <폴더명>                   
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --editable not recognized
---
Failed   <<< <폴더명> [1.81s, exited with code 1]

 

3. 오류 원인

setuptools가 오히려 최신 버전이라서 생기는 문제였다.

setuptools ≥ 66.0 이후 버전은 editable 설치 방식에 대해 setup.py만 있는 레거시 프로젝트를 지원하지 않도록 변경했다.

따라서

  • colcon build + --symlink-install 환경에서
  • setup.py만 있는 패키지를 editable install 하려 하면,
  • setuptools가 더 이상 --editable을 허용하지 않음 → 에러 발생

 

4. 해결 방법 : setuptools를 다운그레이드 하면 된다.

pip install --upgrade "setuptools<66"