언빌리버블티
[Python] ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. 본문
Language/ErrorNote
[Python] ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
나는 정은 2022. 10. 12. 00:33ERROR: pip's dependency resolver does not currently take into account
all the packages that are installed
This behaviour is the source of the following dependency conflicts.
requests 2.23.0 requires urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1,
but you have urllib3 1.26.12 which is incompatible.
Successfully installed async-generator-1.10 exceptiongroup-1.0.0rc9 h11-0.14.0
outcome-1.2.0 selenium-4.5.0 sniffio-1.3.0 trio-0.22.0 trio-websocket-0.9.2
urllib3-1.26.12 wsproto-1.2.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
pip로 라이브러리를 설치할 때 이런 에러가 종종 발생한다.
WARNING: The following packages were previously imported in this runtime:
[urllib3]
You must restart the runtime in order to use newly installed versions.
이미 존재하는 소프트웨어 패키지와 연결된 프로그램 라이브러리이지만 버전 간 의존 관계가 일치하지 않는다는 말이다.
selenium을 설치하려 했으나 requests가 urllib3과 일치하지 않는다는 메세지를 받았다.
requests 2.23.0 requires urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1,
but you have urllib3 1.26.12 which is incompatible.
requests 모듈이 요청한 2.23.0에는 urllib3가 필요한데 나한테 설치된 모듈은 호환되지 않는 urlib3 1.26.12를 가지고 있다.
해결방법
python 설치 패키지의 의존 관계 오류 해제
Python의 None과 NULL의 차이점 상세 정보 그래서 대상 = 속성 + 방법 (사실 방법도 하나의 속성, 데이터 속성과 구별되는 호출 가능한 속성 같은 속성과 방법을 가진 대상을 클래스, 즉 Classl로 분류할
intrepidgeeks.com
위 글을 참고하여 설치된 패키지 목록을 뽑아 urlib 패키지에 대한 버전과 의존성을 재확인했다.
설치되어있는 패키지 목록 확인
!pip check
urllib3 과 requests 패키지를 모두 업데이트
!pip install -U urllib3
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (1.26.12)
!pip install -U requests
Successfully installed requests-2.28.1
WARNING: The following packages were previously imported in this runtime:
[requests]
You must restart the runtime in order to use newly installed versions.
업데이트 해준 다음 CoLab 의 경우 런타임 재시작하고 다시 import 하면 잘 실행된다 !
'Language > ErrorNote' 카테고리의 다른 글
Comments