2

I just updated from 3.6 and curses is nowhere to be found in pip list. When I try to run my program I get

Traceback (most recent call last):
  File "/media/HD/Documents/Python/program/menu.py", line 1, in <module>
    import curses
  File "/usr/local/lib/python3.9/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

"pip3 install curses" gives me

ERROR: Could not find a version that satisfies the requirement curses (from versions: none)
ERROR: No matching distribution found for curses

Any ideas? Does python not come with curses anymore?

Edit: This is in Ubuntu

Ben Alan
  • 1,399
  • 1
  • 11
  • 27

3 Answers3

2

I solved this issue by using below command. It adds support for the standard Python curses module on Windows. Read more about it here.

pip install windows-curses

EdwardFunnyHands
  • 103
  • 2
  • 11
0

For Linux, you need to install UniCurses which is OS-independent. Note that UniCurses hasn't need maintained in a while, but you could find some more information on it here.

PApostol
  • 2,152
  • 2
  • 11
  • 21
  • It doesn't install. "Fatal error: this Python release does not support ctypes, please upgrade your Python distribution if you want to use UniCurses on a linux platform." But I'm using 3.9.5 the most recent version of python. – Ben Alan May 26 '21 at 21:33
  • Given how old UniCurses is, there's a good chance it's not compatible with the most recent version of Python. – PApostol May 26 '21 at 21:52
  • https://pypi.org/project/Uni-Curses/ https://github.com/unicurses/unicurses#installing-unicurses – Giorgos Xou Oct 24 '21 at 21:17
0

I solved this problem by using an earlier version of python (3.6.9)

Sadly, this is probably the only solution.

Ben Alan
  • 1,399
  • 1
  • 11
  • 27