Why does pip3 install in ~/.local on Debian? Python

Are testing Debian 10 in VM? And you are thinking that why does pip3 install in the local folder on Debian? In this article, I will let you know why it gets installed on the local folder and how you install the pip3 system-wide on Debian.

Reason of pip3 install in ~/.local on Debian

Pip has been updated in recent Debian/Ubuntu versions so that it now defaults to using the “User Scheme,” which is a significant behavior change that may come as a surprise to some users.

You can get further information about the above warning here.

How to Install pip3 system wide on Debian

When pip3 is executed outside of a virtual environment, it defaults to the user scheme, and files are installed in the /.local directory.

If you want to install a tool system-wide on Debian and derivatives, you may still utilize pip3 to accomplish your goal to utilize the system scheme.

pip3 install --system ...

It’s worth checking to see if the utility in issue is available as a Debian package; Debian 10 brought a large number of new packages to the distribution.

Virtual environments are often preferable than physical environments in many situations. Even among core Python developers, the question of Python tool installation causes a great deal of dispute.

If you liked our answer then please follow us on FacebookTwitter and Subscribe to our Newsletter to join a great community of developers around the world. Let us know the questions and answer you want to cover in this blog.

Further Read:

  1. Equivalent to “source” in OpenBSD? Python Linux/Unix
  2. How to Make python3.7 default on Unix/Linux
  3. Stop/Kill a process from the command line after a certain amount of time Python

Leave a Reply

Your email address will not be published. Required fields are marked *