[Error] pip를 통한 라이브러리 설치 시 발생하는 오류
pip를 통해 라이브러리를 설치할 때 가끔 다음과 같은 오류가 발생합니다.
1
2
3
4
5
6
7
8
ERROR: 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.
azure-core 1.29.6 requires anyio<5.0,>=3.0, which is not installed.
azure-core 1.29.6 requires requests>=2.21.0, which is not installed.
azure-storage-blob 12.19.0 requires cryptography>=2.1.4, which is not installed.
bleach 5.0.1 requires webencodings, which is not installed.
botocore 1.34.11 requires jmespath<2.0.0,>=0.7.1, which is not installed.
humansignal-drf-yasg 1.21.9 requires inflection>=0.3.1, which is not installed.
humansignal-drf-yasg 1.21.9 requires pyyaml>=5.1, which is not installed.
위 오류는 pip의 버전이 낮거나, 가상환경이 깨진 경우, 또는 다른 이유로 발생할 수 있습니다.
이를 해결하는 방법은 몇 가지가 있습니다.
첫 번째는 다음의 코드로 pip의 버전을 업그레이드 하는 것 입니다.
1
pip install --upgrade pip
두 번째는 가상환경을 재생성 하는 것 입니다. 현재 사용하려고 하는 가상환경이 모종의 이유로 손상되었을 수 있습니다. pip 업그레이드로 해결이 안될 경우에 가상환경을 재생성합니다.
1
2
3
4
5
conda env remove -n [가상환경 이름]
conda create -n [가상환경 이름] python==[버전]
conda activate [가상환경 이름]
pip install --upgrade pip
마지막으로 –no-deps 옵션을 통해 종속성 문제를 피할 수 있습니다. 해당 옵션은 의존성을 해결하지 않고 주어진 패키지만 설치하는 옵션입니다.
1
pip install --no-deps [패키지 이름]
This post is licensed under CC BY 4.0 by the author.