2

A few days ago I was installing a development environment for django on ubuntu 18.04. However when I installed pip a question came up. What is the difference between using pip from the deadsnakes python installation or using it when installing it from apt install python-pip?

pete
  • 121
  • 1
  • This does not answer my question, because they basically explain if it is safe to install software from a PPA and that is not the answer I am looking for. – pete Apr 15 '20 at 02:01
  • Welcome to Ask Ubuntu where we translate all languages and convert code in screenshots to text and the Stack Overflow mods can't yell at us. OK, if that's what makes you happy, but don't blame it on me if your operating system starts to pile up with unmet dependencies and other package management problems because of your unrequited love of deadsnakes. – karel Apr 15 '20 at 02:03
  • I think you still don't understand the purpose of my question, I don't have a love story with the deadsnakes PPA. My goal is just to understand what the difference is between using the pip version that comes installed with a python version or between using the one that is installed with apt install python-pip. – pete Apr 15 '20 at 02:07
  • OK pip is pip so it's probably the same package except for the added risk of dependency hell. The PPA is totally unnecessary for pip because you can upgrade python-pip and python3-pip directly from the terminal: https://askubuntu.com/a/1050684 – karel Apr 15 '20 at 02:11
  • Packages from the deadsnakes PPA (and some other PPAs) are typically used by folks who want to use newer versions of software upon older releases of Ubuntu. Compare the versions available, and you will see that deadsnakes is usually newer. @karel has a very valid and important point - many, many "broken system" threads in this venue are directly caused by folks (unwisely) trying to run newer software on older releases. – user535733 Apr 15 '20 at 02:16
  • Whoa. PPAs are usually NOT a wise way to update your packages. That's the mistake that lots of folks make. If you want newer software, the safest way is to migrate to a newer release of Ubuntu. That's how Debian-based package management is designed to work. – user535733 Apr 15 '20 at 02:20
  • Yes, I understood what you mean is suppose a version of ubuntu comes with python 3.6 and I want python 3.7. Should I look for a version of ubuntu that has that version? – pete Apr 15 '20 at 02:39
  • Depends upon your level of skill. You can use Conda or Venv to juggle multiple versions of Python, if you have the skill to use it wisely. Some developers find it simpler to use multiple VMs, each with a different release of Ubuntu (and the corresponding release of Python). Our advice is to NOT permanently replace the default Python that comes with a release of Ubuntu - various system components, like the package manager, depend upon that version. – user535733 Apr 15 '20 at 02:47
  • As per above, there probably isn't much difference regarding pip and you usually get an info message about upgrading pip to the latest version. Regarding deadsnakes in general - I started with python 3.8 from deadsnakes and had issues with updates in various dependency libs, so any liveupdates failed. Decided to remove the deadsnakes installation and built 3.8 from python.org and all is working successfully. – DaveStSomeWhere Apr 15 '20 at 03:21
  • A different use case is when you have to downgrade python due to compiled software that demands an older version. Deadsnakes does not seem to include pip in its older 3.7, loads minimal version, which is a bother. – DragonLord Mar 30 '21 at 14:55

1 Answers1

0

Depending what apt install python-pip does. Hopefully there is no difference because PIP just uses the Python as the interpreter to install Python packages depending on the Python installation path. You can use it in virtual envs or installing packages to the global system.

Istvan
  • 103