• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

chapter04-02 예제 5번 에러 문의 드립니다.

22.08.30 10:58 작성 조회수 199

0

안녕하세요!

# 예제5
name = "FineAppLe"

for n in name:
    if n.isupper():
        print(n)
    else:
        print(n.upper())

강의와 동일하게 했는데 아래와 같이 에러가 나오네요.. (vscode 사용하고 있습니다)

PS G:\My Drive\101) Study\python_basic>  g:; cd 'g:\My Drive\101) Study\python_basic'; & 'C:\Python310\python.exe' 'c:\Users\hongk.KGRAM\.vscode\extensions\ms-python.python-2022.12.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '50805' '--' 'g:\My Drive\101) Study\python_basic\chapter04_02.py'
Traceback (most recent call last):
  File "g:\My Drive\101) Study\python_basic\chapter04_02.py", line 9, in <module>
    from curses.ascii import isupper
  File "C:\Python310\lib\curses\__init__.py", line 13, in <module>
y Drive\101) Study\python_basic\chapter04_02.py'
Traceback (most recent call last):
  File "g:\My Drive\101) Study\python_basic\chapter04_02.py", line 9, in <module>    from curses.ascii import isupper  File "C:\Python310\lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'
PS G:\My Drive\101) Study\python_basic>

답변 2

·

답변을 작성해보세요.

0

kiminhong님의 프로필

kiminhong

질문자

2022.08.31

안녕하세요,

알려주신대로 설치하고 해결 됐습니다.

감사합니다.

0

안녕하세요.

현재 올려주신 실행코드는 작동해야 하는 코드인데 검색을 해보니 curse 오류가 간혹 나오는 경우

환경에 관한 문제가 있어 보여요.

처도 처음보는 에러라 검색해서 해결해야 될 것 같아요.

아래 링크를 드릴테니 읽어보시고 pip install windows-curses 설치 후 실행해보세요.

https://studyforus.com/tipnknowhow/842957