Permission denied when installing Pylint on VSCode

If you try to enable linting with Pylint and format with saving using autopep8, none of them will be installed due to a permission denial.

Pylint:

IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/mccabe.py' 

Autopep8:

 IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pep8.py' 
+5
source share
2 answers

Run this command:

 sudo chown -R $USER /Library/Python/2.7 
+7
source

You can press ⬆ (up arrow) on the terminal tab after the installation does not return to the command in which it was started. In this case:

 /usr/bin/python -m pip install pylint 

Press fn + β¬… (left arrow key) to go to the beginning of the line, then insert the command 'sudo' in front of you (without the quotes, but including the ending space), and press enter to re-run the command as root - it should look like this:

 sudo /usr/bin/python -m pip install pylint 

You will be prompted to enter a password, then the package will be installed without permission errors.

+4
source

Source: https://habr.com/ru/post/1263007/


All Articles