[PYTHON] When moss with pip install

$ pip install awscli
Collecting awscli
  Using cached awscli-1.11.100-py2.py3-none-any.whl
Collecting botocore==1.5.63 (from awscli)
  Using cached botocore-1.5.63-py2.py3-none-any.whl
Collecting PyYAML<=3.12,>=3.10 (from awscli)
  Using cached PyYAML-3.12.tar.gz
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Requirement already satisfied: docutils>=0.10 in /Library/Python/2.7/site-packages (from awscli)
Collecting s3transfer<0.2.0,>=0.1.9 (from awscli)
  Using cached s3transfer-0.1.10-py2.py3-none-any.whl
Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
  Using cached colorama-0.3.7-py2.py3-none-any.whl
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from botocore==1.5.63->awscli)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.5.63->awscli)
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
  Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.9->awscli)
  Using cached futures-3.1.1-py2-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.5.63->awscli)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, botocore, PyYAML, pyasn1, rsa, futures, s3transfer, colorama, awscli
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/79/6lc6_m110md6m03whc56mdhm0000gn/T/pip-l8lgyp-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

Countermeasures

Add --ignore-installed.

$ pip install awscli --ignore-installed
The directory '/Users/naoiwata/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/naoiwata/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting awscli
  Downloading awscli-1.11.100-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 982kB/s
Collecting botocore==1.5.63 (from awscli)
  Downloading botocore-1.5.63-py2.py3-none-any.whl (3.5MB)
    100% |████████████████████████████████| 3.5MB 304kB/s
Collecting PyYAML<=3.12,>=3.10 (from awscli)
  Downloading PyYAML-3.12.tar.gz (253kB)
    100% |████████████████████████████████| 256kB 2.9MB/s
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
  Downloading rsa-3.4.2-py2.py3-none-any.whl (46kB)
    100% |████████████████████████████████| 51kB 6.7MB/s
Collecting docutils>=0.10 (from awscli)
  Downloading docutils-0.13.1-py2-none-any.whl (537kB)
    100% |████████████████████████████████| 542kB 1.8MB/s
Collecting s3transfer<0.2.0,>=0.1.9 (from awscli)
  Downloading s3transfer-0.1.10-py2.py3-none-any.whl (54kB)
    100% |████████████████████████████████| 61kB 5.2MB/s
Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
  Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.5.63->awscli)
  Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.5.63->awscli)
  Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 4.0MB/s
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
  Downloading pyasn1-0.2.3-py2.py3-none-any.whl (53kB)
    100% |████████████████████████████████| 61kB 6.7MB/s
Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.9->awscli)
  Downloading futures-3.1.1-py2-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.5.63->awscli)
  Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: docutils, jmespath, six, python-dateutil, botocore, PyYAML, pyasn1, rsa, futures, s3transfer, colorama, awscli
  Running setup.py install for PyYAML ... done
Successfully installed PyYAML-3.12 awscli-1.11.100 botocore-1.5.63 colorama-0.3.7 docutils-0.13.1 futures-3.1.1 jmespath-0.9.3 pyasn1-0.2.3 python-dateutil-2.6.0 rsa-3.4.2 s3transfer-0.1.10 six-1.10.0

Recommended Posts

When moss with pip install
Error with pip install
Install scikit.learn with pip
When pip install fails
Install github repository with pip
A memorandum when an error occurs with pip install
Install Python 2.7.9 and Python 3.4.x with pip.
Permission denied with pip install pyopenssl
Manipulate colors with pip install color
How to install mysql-connector with pip3
Proxy error when running "pip install"
[Python Windows] pip install with Python version
SSL certificate related with pip install? Error
sudo pip install
I get an error when trying to install maec 4.0.1.0 with pip
I want to pip install with PythonAnywhere
Install by specifying the version with pip
scipy stumbles with pip install on python 2.7.8
A workaround when installing pyAudio with pip.
I can't install the package with pip.
Let's install box2d-py with Windows 10 environment pip
Error when installing a module with Python pip
I can't install Dask with pip on Ubuntu
How to deal with errors when hitting pip ②
Avoiding "'ascii' codec can't decode" with pip install
Install pip and pandas with Ubuntu or VScode
Pip install a private repository when building Docker
Eliminates SSL error when PIP Install on Windows.
Steps to install your own library with pip
Install pip on Mavericks
PIL installation with pip
Install pip, pyenv, BeautifulSoup4
Installing packages with pip3
How to install pip
Use pip with MSYS2
Install Voluptuous with Python 2.5
Install the pip command
Install torch-scatter with PyTorch 1.7
Install python with pyenv
Install pip / pip3 on Ubuntu
pip install ○○○ error Command errored out with exit status 1:
I got a UnicodeDecodeError when pip install on ubuntu
When architecture not supported comes out with pip (Mac)
Until you install TensorFlow-GPU with pip in Windows environment
I stumbled upon PyUnicodeUCS4_FromStringAndSize when inserting TensorFlow with pip
Install tweepy with pip and use it for API 1.1
For those who are in trouble with an error when pip install xg boost
I got an error when pip install pandas on Mac, so I dealt with it
[AWS] What to do when you want to pip with Lambda
I got an error when pip install tweepy on macOS Sierra, so I dealt with it
When using optparse with iPython
[Road to intermediate Python] Install packages in bulk with pip
Bulk update with pip (with confirmation)
Install Python environment with Anaconda
Install Keras (used with Anaconda)
Until you can install your own Python library with pip
Can't find the package you installed with pip install --user?
Manually fix pip install not possible with Unicode Decode Eroor
Use pip with Jupyter Notebook
Specify version with conda install
Useful when debugging with TouchDesigner