라즈베리파이에 기본 설치되는 tkinter 모듈이 없을 때
ImportError: No module named tkinter
Python2.7
import Tkinter as tk #대문자 T로 바꿔줘야함
Python3
import tkinter as tk
Python2.7 사용 시
SyntaxError: Non-ASCII character '\xea' in file main_tk.py on line 44, but no encoding declared;
see http://python.org/dev/peps/pep-0263/ for details
상단에 주석 작성
# -*- coding: utf-8 -*-
'임베디드 > Raspberry PI' 카테고리의 다른 글
[라즈베리파이] apt-get update 에러 해결방법 (0) | 2025.03.10 |
---|---|
[라즈베리파이] RTL8192EU 무선랜 드라이버 설치 (0) | 2023.08.11 |
[Raspberry Pi] 라즈베리파이에서 파이썬 삭제하기 (1) | 2022.07.26 |
(실행에러) Permission denied: '/dev/ttyAMA0' 에러 (0) | 2022.01.19 |
(주의) apt-update 시 N: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable' 해결방법 (0) | 2021.11.03 |