No module named '_curses' - python

Traceback (most recent call last):
File "c:\the stuff\DarkOS-main\bootscreen.py", line 21, in <module>
from curses import *
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1008.0_x64__qbz5n2kfra8p0\lib\curses\__init__.py", line
13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
How do you get '_curses' on windows?
Some code:
from curses import *

It is very simple. You need to install the library by running
pip install windows-curses
You could type the above command in command prompt for Vscode or on the terminal in Pycharm

Related

ModuleNotFoundError: No module named '_curses'

I am using windows and would like to use the curses package,I installed it with the command:
pip install windows-curses
but when I try to import curses
it gives an eror from the python source file
__init__.py
here's the eror:
C:\Users\user\PycharmProjects\snake\venv\Scripts\python.exe C:/Users/user/AppData/Local/Programs/Python/Python39/Lib/curses/__init__.py
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\Lib\curses\__init__.py", line 12, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
Can someone please help me fix it?

"ImportError: No module named six" ubuntu 20.04

when running "src/bitmessagemain.py" in the terminal it shows
Traceback (most recent call last):
File "src/bitmessagemain.py", line 33, in <module>
import shared
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/shared.py", line 19, in <module>
import highlevelcrypto
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/highlevelcrypto.py", line 16, in <module>
from bmconfigparser import BMConfigParser
File "/home/otsudo/Desktop/PyBitmessage-0.6/src/bmconfigparser.py", line 10, in <module>
from six import string_types
ImportError: No module named six
I am guessing it has to do something with the virtualenv due to bitmessage still running on python 2.7 but I cant figure it out. I've made the environment for bitmessage to run in and I keep getting the error.
You probably don't have the six Python module installed,
try this:
pip install six

Python Interpreter: ModuleNotFoundError: No module named '_tkinter'

When I run import tkinter I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/tkinter/__init__.py", line 37, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
Ruuning apt-get install python3-tk doesn't sove this issue.
Running Python 3.9 on Debian Experimental
Maybe you can try import tkinter instead of import _tkinter

ImportError: No module named _winreg python2.7

I tried to install wmi in my system which is running with python2.7.12.
installed WMI using pip : pip install wmi
But it shows below error
>>> import wmi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/wmi.py", line 88, in <module>
from win32com.client import GetObject, Dispatch
ImportError: No module named win32com.client
>>>
Then, I tried to install win32 python module. But its failed with "ImportError: No module named _winreg".
Full error message:
root#srv1:/home/srv1/Downloads/pywin32-220# python setup.py install
Traceback (most recent call last):
File "setup.py", line 82, in <module>
import _winreg
ImportError: No module named _winreg
root#srv1:/home/srv1/Downloads/pywin32-220#

ImportError: No module named 'baseapi'

I can`t use the pyfcm module because of bellow error message.
How do I fix this error??
>>> from pyfcm import FCMNotification
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from pyfcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\__init__.py", line 6, in <module>
from .fcm import FCMNotification
File "C:\Anaconda3\lib\site-packages\pyfcm\fcm.py", line 1, in <module>
from baseapi import BaseAPI
ImportError: No module named 'baseapi'
If you are running Linux, try running this command in the shell: pip install baseapi.
If you are using an IDE, look for a prompt asking if you want to install this package.

Categories