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

Mohammed

Guys, does anyone know the answer?

get defaulting to user installation because normal site-packages is not writeable from screen.

pip/python: normal site

I have a new Macbook - a user installed it, and then I installed a new user (mine), granted admin privileges and deleted the old one. I am on OS Catalina. Since the installation I've been having se...

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

Ask Question

Asked 2 years, 1 month ago

Active today Viewed 197k times 73

I have a new Macbook - a user installed it, and then I installed a new user (mine), granted admin privileges and deleted the old one. I am on OS Catalina.

Since the installation I've been having several permission problems. VSCode can't find Jupyter Notebook, pip installs packages at ~/Library/Python/3.7/site-packages.

When I do which python3 I get usr/bin/python3. When I do pip3 install I get: Defaulting to user installation because normal site-packages is not writeable And then it says it has already been installed, even though I can't access it when I do import

.

It's seems clear that this is a permission problem, pip can't install to the "base" python, and them python can't find what I've installed into ~/Library/Python/3.7/site-packages.

I've tried reinstalling the OS, but since I haven't done a clean install, it didn't change anything. What am I missing? How exactly can I fix permissions? Where do I want packages to be installed (venv sure, but some packages I want global (like jupyter).

python pip Share

Improve this question

edited Feb 27, 2021 at 23:45

bad_coder 8,03818 18 gold badges 33 33 silver badges 51 51 bronze badges

asked Jan 31, 2020 at 2:16

lowercase00 1,2012 2 gold badges 9 9 silver badges 25 25 bronze badges 1

I'm having this problem as well. I wonder if it has to do with the end of Python 2.7 support –

Chris Dutrow

Feb 8, 2020 at 18:42

3

Are you sure that you are using the correct pip? What if you use the much safer python -m pip install ....? –

Tom de Geus

Feb 10, 2020 at 14:10

3

@TomdeGeus: Well, python3 -m pip install ... in this case, but yes, when there are multiple versions of Python involved, it's much safer to invoke pip via the "exec module" approach, so you know you're using the expected Python executable. –

ShadowRanger

Feb 18, 2020 at 14:46

2

To fix this I ended up uninstalling python3 (previously installed with brew) and using pyenv to install python3. Now it all works. Followed this guide: opensource.com/article/19/5/python-3-default-mac (skip to last section) –

Arseny Levin

Mar 19, 2020 at 15:36

Add a comment

12 Answers

Active Oldest Votes 34

As @TomdeGeus mentioned in the comments, this command works for me:

Python 3:

python3 -m pip install [package_name]

Python 2:

python -m pip install [package_name]

Share Improve this answer

edited May 9, 2021 at 5:01

answered Jun 6, 2020 at 3:46

Dammio 5665 5 silver badges 14 14 bronze badges 3

tnx man. adding python to start of command helped me –

Reza

Jan 18, 2021 at 7:38

5

I have this problem even though I am using the command from this answer –

Jan Pisl

Aug 25, 2021 at 11:25

Add a comment 19

It's best to not use the system-provided Python directly. Leave that one alone since the OS can change it in undesired ways, as you experienced.

The best practice is to configure your own Python version(s) and manage them on a per-project basis using virtualenv (for Python 2) or venv, possibly via poetry, (for Python 3). This eliminates all dependency on the system-provided Python version, and also isolates each project from other projects on the machine.

Each project can have a different Python point version if needed, and gets its own site_packages directory so pip-installed libraries can also have different versions by project. This approach is a major problem-avoider.

Share Improve this answer

edited Sep 27, 2021 at 19:49

answered Feb 18, 2020 at 14:53

Chris Johnson 18.7k5 5 gold badges 74 74 silver badges 76 76 bronze badges 1

I had the same problem and I also had venv set. What I had to do was to execute the pip within my virtual environment "venv" as follows: .venv/bin/pip install -r pypackages.txt –

FernandoTrinciante

Sep 15, 2020 at 15:12

@chris-johnson: Everything you said makes sense, but how do I do it exactly? On my new MBP M1, when I tried, in venv, to do pip3 install gjango, I got this error message: Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement gjango (from versions: none) ERROR: No matching distribution found for gjango –

YCode

Dec 21, 2021 at 20:02

Add a comment 14

python3.7 -m pip install [package_name]

(you should use the version that you have, of course)

solved it for me.

The most voted answer python3 -m pip install [package_name] does not help me here.

In my case, this was caused by a conflict with the dominating 3.6 version that was also installed as a default. You might ask yourself why you have 3.6 on your system, you will most probably not use that version now. The reason is that 3.6 is used as an independent default python version for many package installers. Those installers do not want to check which individual version you use and whether that fits, they just use 3.6 as a default, if you like it or not.

स्रोत : stackoverflow.com

To avoid this problem you can invoke Python with '

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

All Languages >> Whatever >> To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable

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

“To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable” Code Answer

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.

whatever by Lonely Lapwing on May 11 2020 Comment

5 xxxxxxxxxx 1

python -m pip install --upgrade --force-reinstall pip

Source: stackoverflow.com

Add a Grepper Answer

pip install failing on python2?

pip is not a batch command but python is installed

pipenv install --python 3.8 jupyter is not recognised as an internal commmand

python pip not working

pip install not happening in python cmd

python 3.7 centos in _run_pip import pip._internal zipimport.ZipImportError: can't decompress data; zlib not available make: *** [altinstall] Error 1

'pip' is not recognized as an internal or external command, operable program or batch file.

pip install doesn't work

pip install qiskit does not work

pip not working in command prompt

pip python 2.7 install installation manually operable program

py2-pip (no such package) required by world py2-pip

pip is not recognized as an internal or external command

pip freeze requirements.txt no weird path

pip freeze showing @ and not showing package version

'pip' is not recognized as an internal or external command

pip is not recognized as an internal or external command cmd

'pipwin' is not recognized as an internal or external command

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. buildozer

Package python3-pip is not available, but is referred to by another package.

No such file or directory: '/tmp/pip-build-sllmC0/jsonschema/setup.py'

pip not installing packages

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

fatal error in launcher: unable to create process using

pip is being invoked by an old script wrapper

pip fatal error in launcher unable to create process using

pip is being invoked by an old script wrapper. this will fail in a future version of pip

fatal error in launcher: unable to create process using pip

fatal error in launcher unable to create process using

pip fatal error in launcher: unable to create process

fatal error in launcher: unable to create process using '"c:\program files\python39\python.exe" "c:\program files\python39\scripts\pip.exe" ': the system cannot find the file specified.

fatal error in launcher unable to create process using pip

pip - fatal error in launcher: unable to create process using '"c:\users\user\desktop\python\python.exe" "d:\sai savit\programming\python\scripts\pip.exe" ': the system cannot find the file specified.

warning: pip is being invoked by an old script wrapper. this will fail in a future version of pip. please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.

warning pip is being invoked by an old script wrapper. this will fail in a future version of pip

fatal error in launcher: unable to create process using '"c:\python310\python.exe" "c:\python310\scripts\pip.exe" ': the system cannot find the file specified.

fatal error in launcher unable to create process using

fatal error in launcher: unable to create process using '"c:\python310\python.exe" "c:\python310\scripts\pip.exe" list': the system cannot find the file specified.

fatal error in launcher: unable to create process using pip.exe"

fatal error in launcher: unable to create process using '"c:\python310\python.exe" "c:\python310\scripts\pip.exe"

pip fatal error in launcher: unable to create process using '"c:\python3.7\python.exe" "c:\python37\scripts\pip3.exe"

pip fatal error in launcher: unable to create process using e:\python\python39\python.exe

python old wrapper

fatal error in launcher: unable to create process using '"c:\python\python38\python.exe" "c:\python\python38\scripts\pip.exe" install flask_paginate': the system cannot find the file specified.

fatal error in launcher: unable to create process using '"c:\python39\python.exe" "c:\python39\scripts\pip3.exe" install webbot': the system cannot find the file specified.

fatal error in launcher: unable to create process using install pyqt5'

fatal error in launcher: unable to create process using '"c:\python310\python.exe" "c:\python310\scripts\pip.exe" --version': the system cannot find the file specified.

स्रोत : www.codegrepper.com

[Solved] Defaulting to user installation because normal site

To Solve Defaulting to user installation because normal site-packages is not writeable Python I Just deleted and reinstalled python. All seems to work just

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

[Solved] Defaulting to user installation because normal site-packages is not writeable Python

July 8, 2021 by admin

Hello Guys, How are you all? Hope You all Are Fine. Whenever I am trying to install any package I get this message first Defaulting to user installation because normal site-packages is not writeable in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Defaulting to user installation because normal site-packages is not writeable Python Error Occurs ?

Whenever I am trying to install any package I get this message first:

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

How To Solve Defaulting to user installation because normal site-packages is not writeable Python Error ?

How To Solve Defaulting to user installation because normal site-packages is not writeable Python Error?

To Solve Defaulting to user installation because normal site-packages is not writeable Python I Just deleted and reinstalled python. All seems to work just fine now… No idea why, but it does not print the message Defaulting to user installation because normal site-packages is not writeable

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

To Solve Defaulting to user installation because normal site-packages is not writeable Python I Just deleted and reinstalled python. All seems to work just fine now… No idea why, but it does not print the message Defaulting to user installation because normal site-packages is not writeable

Solution 1: Reinstall python

I deleted and reinstalled python. All seems to work just fine now… No idea why, but it does not print the message Defaulting to user installation because normal site-packages is not writeable

Solution 2: change the download location of python

Just try to change the download location of python, and run cmd as admin/without admin, try both.

Solution 3: update Python version

Just try to update the python version.

Solution 4: Use python version while installing package

You Must have to use Python version while installing package.

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]

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also ReadSyntaxError: invalid syntax to repo init in the AOSP code.

स्रोत : exerror.com

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 upgrade pip?

Updating Pip When an update for pip is available, and you run a pip command, you will see a message that says, “You are using pip version xy. a, however version xy. b is available.” You can run “pip install --upgrade pip” to install and use the new version of pip.

Where are Pyenv site packages?

More precisely, it installs packages into an existing Python installation, for example in /usr/lib/python3/dist-packages/ . If pip is run inside a pyenv environment, it will install the packages into the currently enabled Python environment, somewhere under $PYENV_ROOT .