성장가능성 200% 프론트엔드의 Dev 다이어리

[오류] /bin/sh: python: command not found 본문

취미코딩/Python

[오류] /bin/sh: python: command not found

ZinnaJeong 2024. 11. 21. 18:45

파이썬을 시작해볼까 하여 인강으로 셋업하던 중 처음부터 막히는 사태가 발생..ㄷㄷ

구글 서치 끝에 간단히 해결할 수 있었다.

 

 

[오류 화면]

 


 

[환경- iOS / VS code 사용]

1. '상단 code -> 기본 설정 -> 설정' 클릭

 

 

2. 설정 클릭 후 나오는 창에 'code-runner' 입력 후 쭉 내리다보면 'Code-runner: Executor Map' 아래의 'setting.json에서 편집' 클릭

 

 

3. 기존 코드(before)를 수정 코드(after)처럼 변경한다.

기존 코드(before)

"code-runner.executorMap": {

   ...

   "python": "python -u"

   ...

}

 

 

수정 코드(after)

"code-runner.executorMap": {

   ...

   "python": "python3 -u"

   ...

}

 

 

 

도움을 받은 곳 출처: https://stackoverflow.com/questions/61620036/how-to-run-python3-code-in-vscode-bin-sh-1-python-not-found/73709162#73709162

반응형
Comments