When installing packages for Python, it is common for users to default to user installation instead of using the normal site packages. This is because the normal site packages is not always writeable, making it difficult to install packages. This article will discuss the advantages of not using site packages and why it is better to default to user installation.
Defaulting to User Installation
User installation is the process of installing packages in the user’s home directory. This is done instead of the normal site-packages directory, which is commonly used for installation of packages. It is the recommended approach for installing packages, as it minimizes the risk of accidentally corrupting system files.
Advantages of Not Using Site Packages
One of the main advantages of not using site packages is that it ensures that the installed packages are only visible to the user who installed them. This prevents the risk of the packages conflicting with system files or other installed packages. Additionally, it also ensures that the packages are only available to the user who installed them, which helps to keep the user’s environment organized and secure.
Another advantage of not using site packages is that it allows users to install packages without having to worry about permission issues. The user installation process does not require the user to have root privileges, which makes it easier to install packages without having to worry about permission issues.
Finally, user installation also helps to keep the environment clean and organized. Since the packages are installed in the user’s home directory, it is easier to keep track of the packages and to manage them in a more organized manner.
In conclusion, defaulting to user installation instead of using the normal site packages is the recommended approach for installing packages. It helps to keep the environment clean and organized, minimizes the risk of conflicts, and eliminates the need for root privileges.