pip install windows-curser displaying error - python

I wanted to install curses to do a project on menu making system using Python. When I tried to import curses in jupyter, I received an error telling me there is no package such as curser... So I tried to install the curser using pip install.
This is what I typed:
pip install windows-curser
And I received an error written like this:
ERROR: Could not find a version that satisfies the requirement windows-curser (from versions: none)
ERROR: No matching distribution found for windows-curser
This is the full error message I get:

Are you getting confused between windows-curses and windows-curser? I don't know, but "curses" is a common library, and "curser" I haven't heard of.
Edit: After some searching, yes, windows-curses is a python package, but windows-curser doesn't appear anywhere. I think this was a typo.

You don't need to install curses because it is part of the standard library. But not on Windows. The documentation says
The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available. You could also try the Console module written by Fredrik Lundh, which doesn’t use the same API as curses but provides cursor-addressable text output and full support for mouse and keyboard input.

Related

Why is the curses module not installing via pip?

I have been trying to install the curses module using the command "pip install windows-curses" but it does not seem to be working and it errors out saying:
ERROR: Could not find a version that satisfies the requirement windows-curses (from versions: none)
ERROR: No matching distribution found for windows-curses
[Edit: I am using python 3.10]
I installed the requests package after that using pip but that seems to install perfectly. So, pip is working correctly, just not the curses module. Is it a problem on my end or is this package actually not available?
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.
Most probably you use Python 3.9 or 3.10 (you should have indicated in the question). To use windows-curses you need to downgrade. You can also download wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses

Where to install a new module from when the module is deprecated in Python

I'm currently working on some Python code, and when I try to run the code it spits an error message
C:\Users\marra\Anaconda3\lib\site-packages\sklearn\externals\six.py:31:
DeprecationWarning: The module is deprecated in version 0.21
and will be removed in version 0.23 since we've dropped support for Python 2.7.
Please rely on the official version of six (https://pypi.org/project/six/).
"(https://pypi.org/project/six/).", DeprecationWarning)
I understand that "deprecated" means that it contains some old version of module that is no longer updated, and what's recommended to do is to replace the old version with an updated version.
But the problem is that I don't know what to do to update it with a newer version.
Will I need to install something via Anaconda Prompt (Anaconda3) with a command like install XXXX?
Or will I need to download something on a certain website? I've already visited the website of the URL shown in the error message (https://pypi.org/project/six/) and tried downloading the files that were shown when I clicked "download file" button there, but they were some files that I couldn't open after all.
My OS is Windows 10.
Any suggestion to fix this?
Try pip install six. That should install the "official" version of six exactly as the error message suggests. Hopefully sklearn should then use that, in preference to the version of six that it bundles inside its own externals subdirectory. If sklearn fails to behave in the desired way, the next thing to try would be to ensure it is upgraded to the latest version, by saying pip install --upgrade sklearn. (You may wish to do that anyway.)

How to execute "pip install script"

I am following this tutorial found here: https://www.javacodemonk.com/post/101/image-manipulation-detection-in-python
It includes the following line:
from script.ndimage import gaussian_filter
But in order to run it, I have to install script first. According to the tutorial, this is how I should install it:
pip install script
However, when I execute this line, this is the error I get:
"Could not find a version that satisfies the requirement script (versions: )
No matching distribution found for script".
(pip is already upgraded to the latest version)
What is the correct way to install "script"?
I think it probably means scipy rather than script.
https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html#smoothing-filters
That tutorial looks broken. The script package on pypi doesn't have a ndimage. Probably it's been broken by a spell check - i imagine it should be scipy.
Don't spell check your code, kids!

pyperclip module raising an error message

I'm using Python 3.4.0 on ArchLinux (without X11) as guest in a Vagrant box. When running my script I get this error message:
Pyperclip could not find a copy/paste mechanism for your system
According to this link, I've installed xsel and xclip packages but I cannot install gtk nor PyQt4 modules, because I get this another error message:
Could not find a version that satisfies the requirement PyQt4 (from
versions: )
According to this post, I should install python3-pyqt4 package, but the package more near showed by pacman is python-pyqt5 and it requires to install many packages included packages for X11. Is this necessary? I wish to preserve my distro light as possible.
Any solution? Thanks in advance.
This method fixed it for me.
pip install QtPy
also you could refer to this thread for more help
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error

pip install PyGTK error

i type the following into the command prompt as administrator:
pip install PyGTK
and get the following error:
Could not find a version that satisfies the requirement PyGTK <from versions:>
No matching distribution found for PyGTK
any thoughts of why this is happening, thank you in advance.
PyGTK is only available for Python 2.6 on Windows.
For more fresh installation instructions see https://pygobject.readthedocs.io/en/latest/getting_started.html
It's pygtk. Case sensitivity has caused the error probably. This has been deprecated for python3 though and has been replaced by pygi.

Categories

Resources