I recently installed ubuntu 18.04 on my computer. Sadly my pc does not have a wifi chip. I do not have ethernet in my house either. Is there a way to install pip3 or any package offline? I do not have another computer with ubuntu installed, so I cannot take the package from there.

Also there may be something wrong with my python installation (it came preinstalled with ubuntu) when I type whereis python3 the first line says it should be in /usr/bin/python3 and /usr/lib/python3 and other directories, but I do not have it in /usr/bin, only /usr/lib.

  • Enter which python. – Jim Apr 14 at 10:23
  • @Emmet which python returns nothing, but which python3 returns /usr/bin/python3, when I try to navigate to that location cd /usr/bin/python3 it says that it's not a directory. I have also tried using sudo bash before those commands. – Kerrot Apr 14 at 10:26
  • 1
    try /usr/bin/python3 (without cd of course) – Jim Apr 14 at 10:29

You have to at least have an internet connection to download things, the installation can be done offline, but to have the package prepared you have to download—you get the idea.

Python interpreter should be included default as part of Ubuntu installation, please check this through which python, in my 18.04 box it returns.

:~$ which python3

Entering /usr/bin/python3.

:~$ /usr/bin/python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
  • thank you, at least I know that python works. But how do I get the pip package? I have another computer (without ubuntu) which has an internet connection. – Kerrot Apr 14 at 10:31
  • Without Ubuntu ? Then you have to download each required file in packages.ubuntu.com/bionic/python-pip, if you have access to Ubuntu with internet this would be alot simpler. – Jim Apr 14 at 10:41
  • If you have the time, please accept this answer by clicking grey checkmark to turn into green checkmark ✅. – Jim Apr 14 at 10:46
  • One more thing, now that I have the source of python-pip what do I do with it? Sorry, I'm just not very familiar with linux – Kerrot Apr 14 at 10:48
  • Copy the source file to your Ubuntu, then open terminal - navigate to directory where the 'source' file located, do sudo dpkg -i *.deb then. – Jim Apr 14 at 10:50

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.