Ubuntu defaulting to user installation because normal site-packages is not writeable

Whenever I am trying to install a new package of Python I am Facing the following error: pip/python: normal site-packages is not writeable In This SolvdError Article, we’ll discuss How this error occurs and what are the possible fixes for this error. Let’s Solve this error together.

Whenever I am trying to install a new package of Python I am Facing the following error.

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

How To fix pip/python: normal site-packages is not writeable error?

  1. How To fix pip/python: normal site-packages is not writeable error?

    To fix pip/python: normal site-packages is not writeable error just Run the command. If you are using python 3 then just run the below command: python3 -m pip install [package_name] And if you are using python 2 then run this command:
    python -m pip install [package_name] I hope these commands will be helpful for you guys. Try it.

  2. pip/python: normal site-packages is not writeable

    To fix pip/python: normal site-packages is not writeable error just Install pip. First of all run the below command sudo pip install And then use brew install [email protected] This will help you to solve this error. Just try this.

Answer 1 : Run the command

If you are using python 3 then just run the below command:

python3 -m pip install [package_name]

And if you are using python 2 then run this command:

python -m pip install [package_name]

I hope these commands will be helpful for you guys. Try it.

Answer 2 : Install pip

First of all run the below command

sudo pip install

And then use

brew install [email protected]

This will help you to solve this error. Just try this.

Answer 3 : Rename the folder of virtual enviroment

If you have virtual enviroment folder name with venv then that is the reason of causing this error. Then you have to just rename the folder to solve this error. Just try it. This will help you to get rid from this error. Just use this method.

Answer 4 : Activate your project environment

If you are using Anaconda on Ubuntu then just use this method to solve your error:

First of all deactivate the current environment

conda deactivate

Then deactivate the base conda environment with

conda deactivate

Then activate your project environment directly by using the below commands

conda activate myenv pip install somepackage

By doing this you can solve your error very easily. Try it.

Answer 5 : Run sudo python3.8 -m pip install

Just type the below command on your terminal to solve this error.

sudo python3.8 -m pip install

If here I will remove sudo then the issue will be remailed same. So Just use the below one to solve this error permanently. Hope this will help you. Try it.

Final Word

So This is All About this error You Just need to run a few commands and your error will be solved. Hope This Above Answer May helped to solve your warning. Comment Below which answer worked For You. Thank You.

Also, Look at this solvderror

  • The minCompileSdk (31) specified in a dependency’s AAR metadata
  • Target Class Controller Does Not Exist In Laravel 8
  • [Webpack-Cli] Error: Cannot Find Module ‘Webpack/Lib/Rules/DescriptionDataMatcherRulePlugin’
  • You Are Running Create-React-App 4.0.3, Which Is Behind The Latest Release (5.0.0)
  • ReactDOM.render is no longer supported in React 18

These two errors are always prompted
001:
WARNING: The script f2py.exe is installed in 'C:\Users\wucha\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
002:
Defaulting to user installation because normal site-packages is not writeable

001: WARNING: The script f2py.exe is installed in 'C:\Users\wucha\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. 002: Defaulting to user installation because normal site-packages is not writeable 003: C:\Users\wucha>pip install numpy Defaulting to user installation because normal site-packages is not writeable Collecting numpy Using cached numpy-1.22.1-cp310-cp310-win_amd64.whl (14.7 MB) Installing collected packages: numpy WARNING: The script f2py.exe is installed in 'C:\Users\wucha\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed numpy-1.22.1

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

How to correct the error “Defaulting to user installation because normal site-packages is not writeable”.
Solution 1: The python need be Reinstalled..
Solution 2: Modify the download the python's location..
Solution 3: Make sure to update the Python version..
Solution 4: Operate python version when you install the package..

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 install text requirements?

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 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.