1
lokesh@lokesh-pc:~$ python3 --version
Python 3.6.5
lokesh@lokesh-pc:~$ pip3 --version
bash: pip3: command not found
lokesh@lokesh-pc:~$ sudo apt-get install python3-pip
[sudo] password for lokesh: 
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 (= 9.0.1-2) but 9.0.1-2.3 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.
karel
  • 114,770
  • 1
    Check your sources.list* file(s) for non 18.04 bionic sources. The version to be installed (python-pip-whl) is for cosmic and not bionic, so something is wrong in your sources and needs fixing. (https://packages.ubuntu.com/search?keywords=python-pip-whl) . Use apt-cache policy python-pip-whl to find more info on where you're getting the cosmic source from & what to correct. – guiverc May 17 '18 at 03:39
  • I think the local package database on the system in question may be out of date. Could you please [edit] your question to include the complete, verbatim output of sudo apt-get update; sudo apt-get upgrade -f python3-pip; apt-cache policy python3-pip python-pip-whl? Thanks. – David Foerster Jun 18 '18 at 22:11

1 Answers1

0
  1. Make sure you remove all non-default sources from sources.lst
  2. Check and remove all software which was installed earlier but has potentially left some packages
  3. apt update
  4. Install
sssnek
  • 1
  • 1
    Welcome to Ask Ubuntu! ;-) How does the OP do #&? Please [edit] your answer and expand. – Fabby Jun 18 '18 at 21:05