ImportError: No module named '_curses' when trying to import blessings

前端 未结 4 2111
死守一世寂寞
死守一世寂寞 2021-02-05 04:46

I am trying to run this:

from blessings import Terminal

t = Terminal()

print (t.bold(\'Hi there!\'))
print (t.bold_red_on_bright_green(\'It hurts my eyes!\'))
         


        
4条回答
  •  被撕碎了的回忆
    2021-02-05 05:15

    First Install curses using pip like this Open Command Prompt

    type "pip install windows-curses"(This Only works if pip is installed in environmental variables)

    If running curses doesn't work using Pycharm, Try other Interpreters Apps like Atom, Visual Studios, and if that does not work, Install Python in Environmental Variables(Links will be at the bottom). Then Launch CMD or Command Prompt and type "python (the root of .py file)" (eg. python C:\Users\user\Plane.py) and then press enter.

    Link for installing Python in Environmental Variables - https://www.youtube.com/watch?v=1jyOHCTgWpg

提交回复
热议问题