[PYTHON] Dealing with PermissionError [Error 1] for pip install -U pip on macOS Sierra

Overview

Mac book Air (late2013) Install python3 environment with anaconda As a beginner, 2.7 environment is not required It's been a while since I tried to install a package with pip I was told to update pip itself.

command

Normally # pip install -U pip If so, will it work? It ends with an error. In the terminal PermissonError: [Error 1] Operation not permitted: '/bin/pip' Is displayed and it does not work.

As a result of investigating for about 3 hours

At the time of El Capitan, I was stuck in the Homebrew area one after another I tried to add Atari when it was related to SIP.

In homebrew, enter the permissions of / usr / local into recovery mode (⌘ + R at startup) and turn off SIP

#csrutil disable

Reboot

chown -R $ (whoami): admin / usr / local Permission change

Enter recovery mode again

#csrutil enable

It ended with, but this time it's Python pip, so it's under / bin, so after cutting SIP as well

chown -R $(whoami):admin /bin

I tried to run it as.

# pip install -U pip

I still got the same error, so I tried it with the following command.

#pip install --user -U pip

I was able to update without any errors.

Maybe

Maybe you didn't need to change the permissions of / bin just by specifying --user in the pip option?

Recommended Posts

Dealing with PermissionError [Error 1] for pip install -U pip on macOS Sierra
I got an error when pip install tweepy on macOS Sierra, so I dealt with it
Error with pip install
Install Java2Python on macOS High Sierra (10.13)
SSL certificate related with pip install? Error
Solution for pip install error [Python] [Mac]
scipy stumbles with pip install on python 2.7.8
How to install cx_Oracle on macOS Sierra
I can't install Dask with pip on Ubuntu
Run pip install on MacOS Python 3.7 or later
Install Python 3 on MacOS Catalina (with Homebrew only)
Eliminates SSL error when PIP Install on Windows.
Install Python and libraries for Python on MacOS Catalina
pip install ○○○ error Command errored out with exit status 1:
Precautions when using sqlite3 on macOS Sierra (10.12) with multiprocessing
For those who are in trouble with an error when pip install xg boost
A memorandum when an error occurs with pip install
Dealing with pip and related installation errors on Ubuntu 18.04
I got an error when pip install pandas on Mac, so I dealt with it
Install pip / pip3 on Ubuntu
Install scikit.learn with pip
Install tweepy with pip and use it for API 1.1
Install Jupiter Notebook on Windows with pip in proxy environment
Summary of yum packages required for pip install on EC2
What to do if pip install mysqlclient fails on MacOS
When moss with pip install
Install github repository with pip
# Solution when pip install gives an error when using Anaconda on Windows 10
I get an error when trying to install maec 4.0.1.0 with pip
How to install pandas on EC2 (How to deal with MemoryError and PermissionError)
It's time to install DB with Docker! DB installation for beginners on Docker
Install Python 2.7.9 and Python 3.4.x with pip.
Pip install --ugrade pip fails on Windows
Get started with MicroPython (on macOS)
Permission denied with pip install pyopenssl
Install Python on Windows + pip + virtualenv
How to install graph-tool on macOS
Install Scipy on Mac OS Sierra
Manipulate colors with pip install color
Install pip on CentOS7. Also iPython.
Install pyStruct on MacOSX10.11 with macports
Install confluent-kafka for Python on Ubuntu
How to install mysql-connector with pip3
Install python2.x on catalina with pyenv
Proxy error when running "pip install"
return errdetails on error with grpc-node
[Python] Make pip available on macOS
[Python Windows] pip install with Python version
Install easy_install and pip on windows
For those who don't have Keras or TensorFlow on GPU on macOS Sierra
I got an SSL related error with pip install, so I solved it
Put MeCab binding for Python with pip on Windows, mac and Linux
Install the python module with pip on a server without root privileges
Links for handling jupyter notebooks on Docker on Ubuntu on VirtualBox on macOS with SSH
[Note] The solution for Python on MacOSX where import hashlib causes an error
A memorandum when an error occurs with pip install