aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

ModuleNotFoundError: No module named '_curses' #1980

Open johnatr opened 2 years ago

johnatr commented 2 years ago

ubuntu 22.04, python 3.8.9

pip installed chalice

typing chalice and now i get

ModuleNotFoundError: No module named '_curses'

File "/home/ec2-user/.local/bin/chalice", line 5, in from chalice.cli import main File "/home/ec2-user/.local/lib/python3.8/site-packages/chalice/cli/init.py", line 39, in from chalice.cli import newproj File "/home/ec2-user/.local/lib/python3.8/site-packages/chalice/cli/newproj.py", line 37, in import inquirer File "/home/ec2-user/.local/lib/python3.8/site-packages/inquirer/init.py", line 1, in from inquirer.prompt import prompt File "/home/ec2-user/.local/lib/python3.8/site-packages/inquirer/prompt.py", line 1, in import inquirer.themes as themes File "/home/ec2-user/.local/lib/python3.8/site-packages/inquirer/themes.py", line 4, in from blessed import Terminal File "/home/ec2-user/.local/lib/python3.8/site-packages/blessed/init.py", line 14, in from blessed.terminal import Terminal # type: ignore File "/home/ec2-user/.local/lib/python3.8/site-packages/blessed/terminal.py", line 21, in from .keyboard import (_time_left, File "/home/ec2-user/.local/lib/python3.8/site-packages/blessed/keyboard.py", line 19, in import curses File "/usr/local/lib/python3.8/curses/init.py", line 13, in from _curses import * ModuleNotFoundError: No module named '_curses'

urton commented 2 years ago

@johnatr did you find a fix? I am getting this now after downgrading from 3.10 to 3.9.

premkirank commented 1 year ago

@johnatr any fix for this? I am using python 3.11 and facing this issue. On checking further I see that _curses is not supported beyond python 3.8 - https://stackoverflow.com/questions/69985874/why-is-the-curses-module-not-installing-via-pip

masatana commented 11 months ago

Hi, I was faced the same error.

Did your Python built w/ curses support?

In my environment, I built my own Python 3.9 distribution w/o curses support.

To fix this, I just installed ncurses-devel before building Python, then install chalice.

orcjun commented 1 month ago

For me, it was not problem of chalice.

I solved problem by following below comment. https://github.com/pyenv/pyenv/issues/240#issuecomment-113902567