i try to install curses module on windows and it ends with this error
-
Type `python --version` in terminal and check it supports or not it supports till python 3.8 I checked from documentation it self! – Bhavya Parikh Nov 11 '21 at 11:35
-
I currently use python 3.10 so what should i do now – Thevindu Senanayake Nov 11 '21 at 13:38
-
Create separate environment and install python which is supported this module currently module does not support python 3.10 – Bhavya Parikh Nov 11 '21 at 13:53
-
can you tell me how to do it – Thevindu Senanayake Nov 11 '21 at 13:55
-
Search for virtual environment or conda environment – Bhavya Parikh Nov 11 '21 at 14:05
2 Answers
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 env
if 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 settings
click on Advanced system settings. - At the bottom of the
Advanced
tab, 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\
.

- 48
- 1
- 5
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

- 3,304
- 2
- 9
- 19