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.
» pip install windows-curses
Videos
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.
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?
I want to install windows curses but don't know how to do it ,Please give clear step by step procedure of installing curses in windows.
I am using windows 10,Pycharm community edition,Python 3.9.
You can't install windows curses with 3.10 yet. It is supported on 3.9. I don't know when it will be supported for 3.10, so your best option for now is just to install 3.9.
You can make a virtual environment with python 3.9 for any projects that need to use curses. A virtual environment makes a copy of your python interpreter and installs it into a directory of your choice. You use this by "activating" the virtual environment, and as long as you're inside that environment, anything you install will be contained by this copied installation.
This allows you to run different versions of python, and it also allows you to install packages that you don't want cluttering up your main installation. It's a good idea to use this for all projects that are going to need packages outside of the standard library (anything that you pip install).
To make a virtual environment with your default interpreter, type:
python -m venv <envname> where <envname> is whatever you want the environments directory to be called. This is usually env.
So python -m venv env would install a fresh copy of your python 3.10 to a folder called env inside your current directory.
You activate this by typing .\<envname>\scripts\activate
You'll then get a prompt that has (<envname>) in front of it, which will let you know you're in that environment.
You can leave that environment by typing deactivate.
In order to use a different version, you have to run venv with the interpreter you want to use on the project. So if you wanted to use python 3.9, it would be something like
"C:\Program Files\Python39\python.exe" -m venv env depending on where you installed python 3.9. The directory I used is usually the default directory when installing for all users.
To more easily work with other versions on windows, I make batch files for each one and put them in a utils folder that's on my system path. (I'll explain how to add a folder to the system path at the bottom if you don't know.)
So make a file called python39.bat, and into that, put "C:\Program Files\Python39\python.exe" %*. (Or wherever the installation is. %* just expands other arguments so you can use it exactly like you would the other executable.
That way you can create a new python 3.9 virtual environment with python39 -m venv env (along with any other arguments you want) instead of typing out the full path.
You can also use --prompt to change the name displayed by your virtual environment instead of changing the name of the folder. This is useful for making it shorter or just keeping things straight when you're using a bunch of environments for different projects. (Using the same folder name allows you have something that doesn't change into your standard ignore files.)
So anyway, here's an example of the full process after you install python 3.9.
- Go to your project directory or wherever you'd like to install the environment.
- type
"C:\Program Files\Python39\python.exe" -m venv env(optional)--prompt somealternatenametodisplay(orpython39 -m venv envif you made a .bat file). - type
.\env\scripts\activate - You should now have (env) or the alternate name at the beginning of your prompt
- type
pip install windows-curses
And everything should work now. Just remember to activate your environment whenever you want to use this.
(To put a folder on the path)
Let's make a new folder called myutils as an example at C:\myutils
and put python39.bat in that folder.
- Right click
My Computer - Select
properties - On the right side under
Related settingsclick on Advanced system settings. - At the bottom of the
Advancedtab, click onEnvironment Variables(You can also get to Environment Variables much faster by opening the start menu and starting to typeenvironment, which should give youEdit the system environment variables). - Under
System variables, selectPath, and then clickEdit... - Type
C:\myutils, hitEnter, and press OK.
Now, open a new terminal, and you'll be able to access any programs you put in that folder.
In your path variable in Environment Variables, you can also change the default python interpreter. The default will be whichever one is at the top (which will probably be 3.9 now that you've just installed it).
To change it back to 3.10, select C:\Program Files\Python310\Scripts\ and click Move Up until it's above the Python39 entries, then do the same with C:\Program Files\Python310\.
GO to this URL and find your python version and download wheel file from it
As from my image it is python 3.7 with 64 bit so i will download this file
windows_curses-2.2.0-cp37-cp37m-win_amd64.whl and give whole path where it is downloaded

and give full path for installation like
pip install filepath\windows_curses-2.2.0-cp37-cp37m-win_amd64.whl in cmd or powershell
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
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?
Hey y'all, I'm trying to create a program, and so think the curses module will be the best fit for what I am doing. The error I get is "module not found"
I already installed it using pip install windows-curses since i'm on a windows system, however when I try to run my code it says that curses is an unrecognized module. Can anyone help me figure out what to do so that I can import and use curses?
Stuff I have already tried/checked:
Uninstalling and reinstalling curses
reloading my editor
checking it is on pip list and pip freeze
Thank you, any help is appreciated