When trying to enable linting with Pylint, and format on save with autopep8, neither will install because of a permission denied error.
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'
To enable linters, open the Command Palette (Ctrl+Shift+P) and select the Python: Select Linter command. The Select Linter command adds "python. linting.
by diehard. VSCode is a lightweight, open source, cross-platform code editor.
First, to check the version of Pylint you're running, run the following command: pylint --version.
You can press ⬆ (up arrow key) in the terminal tab after the install fails to return to the command that it ran. In this case:
/usr/bin/python -m pip install pylint
Press fn+⬅ (left arrow key) to jump to the beginning of the line, then insert a 'sudo ' (no quotes, but including the trailing space) in front of the command, 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 for your password then the package will be installed without permissions errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With