반응형
VScode에서 파이썬 실행했을 때
아래와 같은 메시지와 함께 정상적으로 결과 출력이 되지 않는 경우가 있다.
분명 파이썬 설치되어있는데 말이다....
[Running] python -u "c:\Users\admin\Desktop\Untitled-1.py"
Python
[Done] exited with code=9009 in 0.233 seconds

이런 경우는 바로 파이썬 설치할 때 나타나는
아래 화면에서 Add Python 3.10 to PATH를 체크하지 않았기 때문이다.
초보자의 경우에는 이 체크의 중요성을 몰라서 그냥 넘어가는 경우가 있다.
그런데 이걸 체크 안하면 코드를 실행했을 때 경로가 맞지 않아
위와 같이 code=9009에러가 발생하는 것이다.

이럴 때는 그냥 기존 설치된 파이썬을 제어판에서 삭제 후
처음부터 다시 설치하면 된다. 물론 체크 박스 꼭 체크한 후^^;;
[Running] python -u "c:\Users\admin\Desktop\Untitled-1.py"
hello
[Done] exited with code=0 in 0.159 seconds

이제 제대로 실행되는 것 확인~!^^
파이썬 초보는 hello world 출력도 쉽지 않다 ㅋㅋㅋㅋ
https://link.coupang.com/a/bvZPUU
가베가족 큰솔가베 13종 엄마샘세트 6세 + 구성품 4종
COUPANG
www.coupang.com

반응형
'파이썬' 카테고리의 다른 글
우분투 VScode에서 한글 입력 안되는 문제 해결방법 (0) | 2022.09.24 |
---|---|
우분투 리눅스에 파이참(pycharm) 설치하는 방법 (0) | 2022.09.24 |
파이썬에서 한글 변수 사용 (0) | 2022.09.11 |
크롤링과 스크래핑 (0) | 2022.08.30 |
[파이썬 기초문법] 원소 1개인 튜플 생성, 반드시 콤마 붙이기! (0) | 2022.08.10 |