For you can use pip install windows-curses to install package.
Then use python codes import curses to use it.
Please note that even though you installed a package called windows-curses, you still import it using import curses. This is because windows-curses is a Windows-compatible version of the curses module, not a separate module.
For you can use pip install windows-curses to install package.
Then use python codes import curses to use it.
Please note that even though you installed a package called windows-curses, you still import it using import curses. This is because windows-curses is a Windows-compatible version of the curses module, not a separate module.
From another post:
Currently the latest version of windows-curses is 2.2.0 and it provides wheels for Python 3.6-3.8 and no source code.
So basically you either have to downgrade your Python installation, or use a different package I suppose.
python - Install NCurses on python3 for Ubuntu - Stack Overflow
windows - What is needed for curses in Python 3.4 on Windows7? - Stack Overflow
installing curses on window
I don't know how to add Curses to Python.
Videos
I had this same problem. The issue was that ncurses was not installed on my Ubuntu installation. To fix it, I ran:
sudo apt-get install libncurses-dev
and then reinstalled Python. In my case with:
pyenv install 3.8.1
Answering y when asked continue with installation? (y/N)
This fixed the problem.
Try this:
import curses
curses is ncurses. It's also built in to python, there's nothing to install.
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-65-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Mon Oct 19 19:06:03 2015 from xxx.xxx.xxx.xxx
me@ubuntu:~$ python3
Python 3.4.0 (default, Jun 19 2015, 14:20:21)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
>>>
You can use curses cross-platform (Windows, MacOS, GNU/Linux) if you install manually for Windows or like other package in others.
Install wheel package. If you need more info about wheel click here.
Go to this repository.
Download a package with your python version, in example for python 3.4:
curses-2.2-cp34-none-win_amd64.whlInstall it (this command if for windows, in GNU/Linux install like other package)
python -m pip install curses-2.2-cp34-none-win32.whlJust include in your python script:
import curses
You can use curses wrapper for python. Works in Fedora 25 in all terminals, and Windows 10 using git bash, powershell, or cmd.
Update:
- An alternative to curses in Windows here.
- Console user interface in Windows here.
- An interesting tutorial here.
Now we can easy install on python 3.7 using pip install windows-curses
I'm following a beginner project tutorial that requires the curses module and using the pip command in cmd "pip install windows-curses" doesn't work and spits out the following in the terminal:
ERROR: Could not find a version that satisfies the requirement windows-curses (from versions: none)
ERROR: No matching distribution found for windows-curses
I can install other stuff using the pip install command but not this specific module, does anyone know why this could happen? what are the possible solutions?
curses is a default module or whatever for python right? but when i imnport curses, the terminal tells me the module does not exist, am i missing something?
» pip install windows-curses