How do I fix defaulting to user installation because normal site packages are not writeable?

Python is a scripting language, and there are times when you have to create a Python package and distribute it manually. The problem is that you have to do a lot of extra work to make sure that you can install the Python package. The following blog post will help users solve “Defaulting to user installation when regular site-packages is not writeable” in Python.

Defaulting to user installation when regular site-packages is not writeable

Have you ever attempted to install a package and received the following error:

Defaulting to user installation because normal site-packages is not writeable

The method to fix the “Defaulting to user installation because normal site-packages is not writeable” problem is uninstalling and then reinstalling Python. After that, everything looks to be in working condition. We’re not sure why, but the message “Defaulting to user installation because normal site-packages is not writeable” doesn’t appear anymore. 

Approach 1: Reinstall Python

After uninstalling and reinstalling Python, It’s all OK. It seems logical that it wouldn’t print out the message “Defaulting to user installation because normal site-packages is not writeable”.

Approach 2: Update The Python Download Location

Change the Python download path and run cmd as admin/without admin, or both.

Approach 3: Upgrade To The Latest Python Version

Just make sure your Python version is up-to-date.

Approach 4: When Installing The Package, Utilize The Python Version

When installing the package, you need to use the Python version.

Python 3:

python3 -m pip install [package_name]

Python 3.7:

python3.7 -m pip install [package_name]

Python 2:

python -m pip install [package_name]

Conclusion

We hope you enjoyed our article about fixing the “Defaulting to user installation when regular site-packages are not writeable” issue. We are confident that with this information, you will be able to make the most of your Python development experience by installing packages in a user-specific location rather than system-wide. 

If you are still having any problems with your Python packages, please feel free to leave us a comment. Thank you for reading; please make sure to share this helpful article with others!


Related Posts
  • Definition about Basic Math Functions.

    Java, which is an important programming language, is a popular program computer in the world. Java is also used for: mobile applications (especially Android apps; desktop applications; web applications; web servers and application servers; database connection; and much more. Above the key information of Java, we have the answer for why we use Java.  Moreover, […]

  • The simple way to fix “Unable to resolve dependency tree” in Reactjs

    Each of these pieces of code can depend on a lot of other open source code, fortunately when library management tools came out, otherwise it would take a lot of work to manage these libraries. With npm, the work will be much simpler, they help you make the management much simpler. The libraries are all […]

  • Instruction about “Arrays within a Class”.

    Before you know about the “Arrays within a Class”, we will help to identify the necessary information of object oriented programming language. It is a useful definition in this program language before you can explore the classes and objects that Arrays within a Class belong to. If you have been waiting for our instruction, we […]

  • Tips On Handling The Error “ModuleNotFoundError: No module named ‘tensorflow.python.saved_model.model_utils’”

    One of the common problems that developers face when working with Android devices is the error – The emulator process for AVD Pixel_C_API_30 was killed. This problem can usually be solved by changing the AVD configuration or upgrading the device driver. This blog will help you to fix this issue. How To Handle The Error […]

  • Tips On Handling The Error “The emulator process for AVD Pixel_C_API_30 was killed” In Windows

    One of the common problems that developers face when working with Android devices is the error – The emulator process for AVD Pixel_C_API_30 was killed. This problem can usually be solved by changing the AVD configuration or upgrading the device driver. This blog will help you to fix this issue. How To Handle The Error […]

Post Views: 880


In this article, you will learn about how to fix defaulting to user installation because normal site packages is not writeable in Python.

In the Python programming language, you may have faced the issue that has mentioned above while installing packages in python. The main reason behind getting this error is that you may have installed two different versions of Python on your local machine.

As a result, when you give the command for installing a package, there’s a chance of conflict and you are getting an error like this. In this article, we are going to see how we can fix this issue.

Solution One

We already know the reason behind this error and we can fix it in multiple ways. Let’s see them one by one. The first approach is to just uninstall the python from the local machine and reinstall it freshly. If you are on a Windows machine, you can simply uninstall any program.

All you need to do is to click on the start menu and search for add/or remove programs and then search for the application that you want to remove. See the below image:

You need to click on the open button and find out about python and simply follow the procedures for uninstalling it. After uninstalling python, you can simply go to python’s official site and from there download python and install it. This may fix the issue for you. Besides this, there’s another way to solve this problem and in the next section, we are going to explore that.

Solution Two

If you do not want to take the hassle of reinstalling python then you may follow this approach. Here, while installing a python package, you need to mention the python version name. Like if you are using python version three then you will mention it and then the rest of the command. See the below example to understand it more clearly:

# For version 3 python3 -m pip install [package_name] # For version 2 python -m pip install [package_name]

You can also use the specific version number while installing a package. For example, if you are using Python version 3.10 then you may install a package by following this:

# For specific version 3 python3.10 -m pip install [package_name]

These are the useful approaches to dealing with the error like defaulting to user installation because normal site packages is not writeable in python and if you ever have faced an issue like this you may solve it by following this article.

Share on social media

//

PreviousNext

What does defaulting to user installation because normal site packages is not writeable mean?

The reason behind this is that you have multiple versions of Python and since you are using pip / pip3 it would try to add the packages in the default version of Python which is managed by Python and hence it will throw an error.

How do I download requirements for texting?

txt file..
cd to the directory where requirements.txt is located..
activate your virtualenv..
run: pip install -r requirements.txt in your shell..

How do I install pip?

Ensure you can run pip from the command line.
Securely Download get-pip.py 1..
Run python get-pip.py . 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they're not installed already. Warning..

How do I download pip3 on Linux?

To install pip3 on Ubuntu or Debian Linux, open a new Terminal window and enter sudo apt-get install python3-pip . To install pip3 on Fedora Linux, enter sudo yum install python3-pip into a Terminal window. You will need to enter the administrator password for your computer in order to install this software.