Search

pip 이슈 - WARNING: Error parsing dependencies of flatbuffers: Invalid version:

1. 에러 원인

pip3 install --upgrade pip setuptools Requirement already satisfied: pip in /usr/lib/python3/dist-packages (24.3.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.12/dist-packages (75.6.0) WARNING: Error parsing dependencies of flatbuffers: Invalid version: '1.12.1-git20200711.33e2d80-dfsg1-0.6' WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Bash
복사
pip를 이용해서 패키지 설치 시 위와 같은 WARNING 문구가 나오는 경우가 존재한다. 해당 WARNING의 원인은 아래와 같다.
Flatbuffers 버전 파싱 에러
flatbuffers 라이브러리의 버전 문자열 '1.12.1-git20200711.33e2d80-dfsg1-0.6' 이 표준 버전 형식(Python PEP 440 규격)을 따르지 않아 pip 가 이를 인식하지 못해 발생하는 문제

2. 해결 방법

flatbuffers 라이브러리를 직접 설치하여 버전 문제를 해결할 수 있다.
해결 방법 1 - flatbuffers 라이브러리를 최신 버전으로 설치
pip3 install flatbuffers --upgrade --force-reinstall
Bash
복사
해결 방법 2 - flatbuffers 라이브러리의 특정 버전을 명시적으로 설치
pip3 install flatbuffers==1.12
Bash
복사
위 2가지 방법으로도 설치가 안되는 경우 pip 문제일 가능성이 있다. 이 경우 pip를 최신 버전으로 업데이트 후 위 해결 방법을 시도하면 된다.
python3 -m pip install --upgrade pip setuptools
Bash
복사