I've successfully installed VSCode and extension for Python. Since Ubuntu comes with two Python2 version 2.7.12 and Python3 version 3.5.2, VSCode uses Python2 as default interpreter. After opening VSCode I used command Ctrl + Shift + P to change preference and I typed Python Interpreter and selected Python3 from drop down, but I get the following error.

Failed to set 'pythonPath'. Error: Permission denied writing to file (file:///home/.vscode/settings.json)
Source:Python (Extension)

How can I access setting.json file and edit it to change interpreter to Python3?

New contributor
Furqan Hashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Does that path exist? – George Udosen Dec 5 at 15:01
  • This path exists ///home/.vscode , I've used following command in terminal cd ~/.vscode – Furqan Hashim Dec 5 at 15:30
  • 1
    No, no. ~/.vscode is not /home/.vscode rather it's /home/$USER/.vscode! Type ~/.vsocde in terminal and press the return key and see the output! – George Udosen Dec 5 at 15:41
  • After typing ~/.vsocde I get /home/furqan/.vscode: Is a directory – Furqan Hashim Dec 5 at 16:25
  • So make the changes if you entered /home/.vscode change that to /home/furqan/.vscode! to get vscode to write to that location! – George Udosen Dec 5 at 16:27

Your Answer

Furqan Hashim is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.