Ubuntu 16.04에 python3-pip를 설치하는 중 "일부 패키지를 설치할 수 없습니다" 오류 발생

Ubuntu 16.04에 python3-pip를 설치하는 중 "일부 패키지를 설치할 수 없습니다" 오류 발생

Ubuntu 16.04에서 명령을 실행하면 sudo apt install python3-pip다음 오류가 발생합니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming. 
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-pip : Depends: python-pip-whl (= 8.1.1-2) but 8.1.1-2ubuntu0.4 is to be installed
               Recommends: python3-dev (>= 3.2) but it is not going to be installed
               Recommends: python3-wheel but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

답변1

패키지 를 제거 python-pip-whl하고 다시 시도하세요.

sudo apt-get remove python-pip-whl

답변2

많은 검색 끝에 마침내 다음 명령을 실행하여 Ubuntu 16.04 시스템에 pip3을 설치할 수 있었습니다.

sudo apt-get install python3-setuptools
sudo easy_install3 pip

답변3

패키지가 손상되었으므로 다음 단계를 따르십시오.

  1. 손상된 패키지를 수정합니다.

    sudo apt -f install
    
  2. 업데이트:

    sudo apt update && sudo apt dist-upgrade
    
  3. 이제 정상적으로 설치하십시오.

    sudo apt install python3-pip
    
  4. 설치되었는지 확인하십시오.

    pip3 --version
    

그러면 문제가 해결될 것입니다.

답변4

많이 검색한 후에 마침내 이것이 나에게 효과적입니다.

sudo apt-get install aptitude

그런 다음 다음 명령으로 pip3을 설치하십시오.

sudo aptitude install python3-pip

관련 정보