728x90
SMALL
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.
- pip3 관련 경고:
- pip가 오래된 스크립트 래퍼를 사용하고 있음 → 해결 방법: python3 -m pip로 실행
- PyYAML 제거 실패:
- distutils를 통해 설치된 패키지는 일반적인 pip uninstall로 제거 불가 → 해결 방법: --ignore-installed 옵션 사용
- Python 3.6이 문제를 일으킬 가능성 있음
- OpenStack의 최신 Kolla-Ansible은 Python 3.8 이상을 권장
- 해결 방법: Python 3.8 이상으로 업그레이드 후 다시 실행
✅ 해결 방법
🔹 1. Python 버전 확인
python3 --version
🚨 Python 3.6.x인 경우 업그레이드 필요
🔹 2. Python 3.8 이상으로 업그레이드 (Rocky 8)
sudo dnf install -y python38 python38-devel python38-pip
📌 기본 Python3 버전을 3.8로 설정
sudo alternatives --set python3 /usr/bin/python3.8 python3 --version # Python 3.8.x 확인
📌 pip 업그레이드
python3 -m pip install --upgrade pip
🔹 3. 기존 충돌하는 패키지 정리
📌 PyYAML 강제 삭제
sudo dnf remove -y python3-PyYAML python3 -m pip install --ignore-installed PyYAML
📌 requests 충돌 해결
python3 -m pip install --ignore-installed requests
LIST