0

I had followed the instructions here to install pip3; I need it to install other python3 packages. I don't remember if I installed pip3 a long time before. After running sudo apt install python3-pip, I get the following as the output,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
The following packages were automatically installed and are no longer required:
  gyp libavdevice-ffmpeg56 libjs-inherits libjs-node-uuid libuv1-dev
  linux-headers-4.13.0-37 linux-headers-4.13.0-37-generic
  linux-headers-4.13.0-38 linux-headers-4.13.0-38-generic
  linux-headers-4.13.0-39 linux-headers-4.13.0-39-generic
  linux-headers-4.13.0-41 linux-headers-4.13.0-41-generic
  linux-headers-4.13.0-43 linux-headers-4.13.0-43-generic
  linux-headers-4.13.0-45 linux-headers-4.13.0-45-generic
  linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic
  linux-image-4.13.0-37-generic linux-image-4.13.0-38-generic
  linux-image-4.13.0-39-generic linux-image-4.13.0-41-generic
  linux-image-4.13.0-43-generic linux-image-4.13.0-45-generic
  linux-image-4.15.0-29-generic linux-image-extra-4.13.0-37-generic
  linux-image-extra-4.13.0-38-generic linux-image-extra-4.13.0-39-generic
  linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-43-generic
  linux-image-extra-4.13.0-45-generic linux-modules-4.15.0-29-generic
  linux-modules-extra-4.15.0-30-generic linux-signed-image-4.13.0-37-generic
  linux-signed-image-4.13.0-38-generic linux-signed-image-4.13.0-39-generic
  linux-signed-image-4.13.0-41-generic linux-signed-image-4.13.0-43-generic
  linux-signed-image-4.13.0-45-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 236 not upgraded.

However, When I type which pip3, I do not get any output. Again, When I typed pip3 -V, I get the following response:

The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip

I tried dpkg -L python3-pip and got the following as the output:

/.
/usr
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/dependency_links.txt
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/not-zip-safe
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/requires.txt
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/entry_points.txt
/usr/lib/python3/dist-packages/pip-8.1.1.egg-info/top_level.txt
/usr/lib/python3/dist-packages/pip
/usr/lib/python3/dist-packages/pip/baseparser.py
/usr/lib/python3/dist-packages/pip/__main__.py
/usr/lib/python3/dist-packages/pip/req
/usr/lib/python3/dist-packages/pip/req/req_set.py
/usr/lib/python3/dist-packages/pip/req/req_install.py
/usr/lib/python3/dist-packages/pip/req/__init__.py
/usr/lib/python3/dist-packages/pip/req/req_file.py
/usr/lib/python3/dist-packages/pip/req/req_uninstall.py
/usr/lib/python3/dist-packages/pip/index.py
/usr/lib/python3/dist-packages/pip/status_codes.py
/usr/lib/python3/dist-packages/pip/utils
/usr/lib/python3/dist-packages/pip/utils/setuptools_build.py
/usr/lib/python3/dist-packages/pip/utils/appdirs.py
/usr/lib/python3/dist-packages/pip/utils/outdated.py
/usr/lib/python3/dist-packages/pip/utils/ui.py
/usr/lib/python3/dist-packages/pip/utils/logging.py
/usr/lib/python3/dist-packages/pip/utils/encoding.py
/usr/lib/python3/dist-packages/pip/utils/deprecation.py
/usr/lib/python3/dist-packages/pip/utils/__init__.py
/usr/lib/python3/dist-packages/pip/utils/filesystem.py
/usr/lib/python3/dist-packages/pip/utils/hashes.py
/usr/lib/python3/dist-packages/pip/utils/build.py
/usr/lib/python3/dist-packages/pip/compat
/usr/lib/python3/dist-packages/pip/compat/dictconfig.py
/usr/lib/python3/dist-packages/pip/compat/__init__.py
/usr/lib/python3/dist-packages/pip/compat/ordereddict.py
/usr/lib/python3/dist-packages/pip/models
/usr/lib/python3/dist-packages/pip/models/index.py
/usr/lib/python3/dist-packages/pip/models/__init__.py
/usr/lib/python3/dist-packages/pip/vcs
/usr/lib/python3/dist-packages/pip/vcs/bazaar.py
/usr/lib/python3/dist-packages/pip/vcs/subversion.py
/usr/lib/python3/dist-packages/pip/vcs/mercurial.py
/usr/lib/python3/dist-packages/pip/vcs/__init__.py
/usr/lib/python3/dist-packages/pip/vcs/git.py
/usr/lib/python3/dist-packages/pip/cmdoptions.py
/usr/lib/python3/dist-packages/pip/basecommand.py
/usr/lib/python3/dist-packages/pip/commands
/usr/lib/python3/dist-packages/pip/commands/completion.py
/usr/lib/python3/dist-packages/pip/commands/install.py
/usr/lib/python3/dist-packages/pip/commands/hash.py
/usr/lib/python3/dist-packages/pip/commands/uninstall.py
/usr/lib/python3/dist-packages/pip/commands/__init__.py
/usr/lib/python3/dist-packages/pip/commands/list.py
/usr/lib/python3/dist-packages/pip/commands/search.py
/usr/lib/python3/dist-packages/pip/commands/show.py
/usr/lib/python3/dist-packages/pip/commands/download.py
/usr/lib/python3/dist-packages/pip/commands/wheel.py
/usr/lib/python3/dist-packages/pip/commands/freeze.py
/usr/lib/python3/dist-packages/pip/commands/help.py
/usr/lib/python3/dist-packages/pip/_vendor
/usr/lib/python3/dist-packages/pip/_vendor/__init__.py
/usr/lib/python3/dist-packages/pip/operations
/usr/lib/python3/dist-packages/pip/operations/__init__.py
/usr/lib/python3/dist-packages/pip/operations/freeze.py
/usr/lib/python3/dist-packages/pip/__init__.py
/usr/lib/python3/dist-packages/pip/locations.py
/usr/lib/python3/dist-packages/pip/pep425tags.py
/usr/lib/python3/dist-packages/pip/exceptions.py
/usr/lib/python3/dist-packages/pip/download.py
/usr/lib/python3/dist-packages/pip/wheel.py
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/pip3.1.gz
/usr/share/doc
/usr/share/doc/python3-pip
/usr/share/doc/python3-pip/copyright
/usr/bin
/usr/bin/pip3
/usr/share/doc/python3-pip/changelog.Debian.gz

which implies that pip3 has been installed.

How do I resolve this issue?

Some more details: I have python 2.7 and python 3 installed in /usr/local/lib/. The python 2.7 has the following pip installations:

/usr/local/lib/python2.7/dist-packages/pip
/usr/local/lib/python2.7/dist-packages/pip-10.0.0.dist-info
/usr/local/lib/python2.7/dist-packages/pip-18.0.dist-info

while there is no pip3 installation in /usr/local/lib/python3.5/. There is only a pip installation in python3.

How do I resolve this issue?

  • what is the output of echo $PATH? – Ravexina Sep 6 '18 at 20:26
  • /home/shuba/.local/share/umake/bin:/home/shuba/bin:/home/shuba/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin – thegreatcoder Sep 6 '18 at 20:31
  • Everything seems okay in your PATH, what happens if you run pip like this: /usr/bin/pip3 -V ? – Ravexina Sep 6 '18 at 20:34
  • I get this: /usr/bin/pip3 -V bash: /usr/bin/pip3: No such file or directory – thegreatcoder Sep 6 '18 at 20:36
  • run: sudo apt install --reinstall python3-pip it might help. – Ravexina Sep 6 '18 at 20:37
0

Try python3 -m pip3 install pip.

You may be trying to use Python2 to run pip3 and that's why you're seeing the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.