0

I download python 3.9 64 bit and for IDE I using pycharm I did totally everything what I suppose to do for curses from this link Text I downloaded and install curses and in cmd I did this to pip install curses-windows and when I run code I still get this error:

Traceback (most recent call last):
File "C:\Users\kretz\OneDrive\Desktop\python programi\snakes\main.py", line 1, in <module>
import curses
File "C:\pytohn\lib\curses\__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'

this is the code

import curses


curses.initscr()
win = curses.newwin(20, 60, 0, 0)
win.keypad(1)
curses.noecho()
curses.curs_set(0)
win.border(0)
win.nodelay(1)


score = 0
while True:
    event = win.getch()
    curses.endwin()
    print(score)
Red
  • 26,798
  • 7
  • 36
  • 58
kretze
  • 1
  • 1
  • From the standard library documentation: The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available. You could also try the Console module written by Fredrik Lundh, which doesn’t use the same API as curses but provides cursor-addressable text output and full support for mouse and keyboard input. https://docs.python.org/3/howto/curses.html – BoarGules Feb 17 '22 at 22:32

1 Answers1

0

Run this in terminal: pip install windows-curses and it should work.

amd
  • 342
  • 1
  • 2
  • 15
  • hey tnx man now i dont have that problem anymore....can you just help me please with that error?? Traceback (most recent call last): File "C:\Users\kretz\OneDrive\Desktop\python programi\snakes\main.py", line 5, in win = curses.newwin(20, 60, 0, 0) _curses.error: curses function returned NULL Process finished with exit code 1 – kretze Feb 18 '22 at 00:29