trungvose / blog-comments

Comments for trungk18.com using utterances
1 stars 0 forks source link

experience/bin-code-line-6-python-command-not-found/ #4

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

/usr/local/bin/code: line 6: python: command not found

https://trungk18.com/experience/bin-code-line-6-python-command-not-found/

Gerguevara commented 2 years ago

Thanks my friend , it works.

hantvu commented 2 years ago

Hello Trung. Thank you for your tip, but when I try to change Python to Python3, the nano file return [ Cannot open file for writing: Read-only file system ]. How to fix this? Or simply, can you show me how to change the line code from Python to Python3? Thank you very much.

Gerguevara commented 2 years ago

@hantvu try to use the command "sudo su" and set your password. then do the steps again.

hantvu commented 2 years ago

@Gerguevara Thanks for your guidance. Can you tell me how to do it step by step. I'm new to all the coding things, so I tried it but failed. Thank you so much.

trungvose commented 2 years ago

@hantvu on step 2, run sudo nano code instead of just nano code

hantvu commented 2 years ago

Thanks, Trung. I did as you recommended, but it still returned [ Cannot open file for writing: Read-only file system ] message when I tried to replace python by python3. Do I need to delete that line of code and replace the whole new line? If yes, how can I do that.

348251248 commented 2 years ago

@hantvu You should move the VSCode from Download to Application :). Please see https://github.com/Microsoft/vscode/issues/7426#issuecomment-425093469

Auzz24 commented 1 year ago

@348251248 I moved vs code but it still will not let me save my changes when I am in the nano code terminal page, it says it can not save a read only file or something like that. Any suggestions?

davigrah commented 1 year ago

After doing it I get the following error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

I solved with xcode-select --install

fredyvizcarra commented 1 year ago

Thanks, Trung. I did as you recommended, but it still returned [ Cannot open file for writing: Read-only file system ] message when I tried to replace python by python3. Do I need to delete that line of code and replace the whole new line? If yes, how can I do that.

@hantvu Could you solve it?

colinborows commented 1 year ago

Ran into all the same issues as @hantvu. Solved by uninstalling and reinstalling VS Code and reinstalling the shell command. Now code . and code -- work perfectly fine.