Permission denied: '/usr/local/bin/pip' Consider using the `--user` option or check the permissions.

python

#1
rstudio-user@045bd9c25682:/cloud/project$ python -m pip install --upgrade pip setuptools
Collecting pip
  Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Collecting setuptools
  Using cached https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl
Installing collected packages: pip, setuptools
  Found existing installation: pip 18.0
    Uninstalling pip-18.0:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/bin/pip'
Consider using the `--user` option or check the permissions.

You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I tried to install python module and some package as states in http://rpubs.com/sjmgarnier/videoplayR but failed... Any solution?


#2

Why do you need to upgrade pip?
What happens if you create a virtualenv and install the python module you want?


#3

This part seems odd

Permission denied: '/usr/local/bin/pip'

Do you have permission to run that command (you should). Something like

ls -l /usr/local/bin/pip

will give you the file permissions


#4

The denial here is because of the attempt to upgrade pip, there is no permission to overwrite that file.


#5

@josh So it is - I was a bit too hasty