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

rishitghoshPosts: 33Joined: Thu Dec 21, 2017 7:06 am

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

Hi....

I ran these 2 commands in the command line -
python -m pip install -U pip
python -m pip install -U pip numpy

At the starting it shows
"Defaulting To User Installation Because Normal Site-packages Is Not Writeable"
But after this it shows the package is installed.
But when I try to important numpy in thonny python IDE it shows an error.


klricksPosts: 8423Joined: Sat Jan 12, 2013 3:01 amLocation: Grants Pass, OR, USA

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

Mon Apr 27, 2020 6:33 pm

rishitghosh wrote: ↑

Mon Apr 27, 2020 6:00 pm

Hi....

I ran these 2 commands in the command line -
python -m pip install -U pip
python -m pip install -U pip numpy

At the starting it shows
"Defaulting To User Installation Because Normal Site-packages Is Not Writeable"
But after this it shows the package is installed.
But when I try to important numpy in thonny python IDE it shows an error.

Thonny uses Python 3 and your commands are for Python 2
Use python3 and pip3

Code: Select all

python3 -m pip3 install -U pip3 python3 -m pip3 install -U pip3 numpy

Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.




Return to “Python”

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

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 can I upgrade Python with 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 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..

Does Python install pip?

PIP is automatically installed with Python 2.7. 9+ and Python 3.4+ and it comes with the virtualenv and pyvenv virtual environments.