When I tried to import xlwings using import xlwings as xw, it shows the following error:
from win32.api import *
ModuleNotFoundError: No module named 'win32.api'
My environment is:
Windows 10
Python 3.10
IDE: PyCharm
Does anyone know how to fix it?
You probably don't have the pywin32 module installed.
Try pip install pywin32 and check this question
Related
I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython
Code:
from pycoin.ecdsa.secp256k1 import secp256k1_generator
When I run this, I get the error:
ModuleNotFoundError: No module named 'pycoin'
I've tried doing:
pip3 install pycoin
aswell as
pip install pycoin
Both of which have lead to the same error.
I've ran the code on python and python3 which also leads to the same error.
Any solutions?
Go to terminal or cmd on windows and type python3 (python2, python for older versions)
Then try to import the module there.
If the module in imported successfully then reopen your IDE. and then try.
I'm trying to use win32gui from pywin32 but I keep getting this error:
ModuleNotFoundError: No module named 'win32gui'
I am on windows 10, python 3.9
I have been researching the top results on stack over flow and google for a while now and the solutions i found don't work for me.
things I have tried:
installed pywin32 via a whl file (this shows in site packages along with win32 ect)
double checked both 64bit versions of python and pywin32 are installed
Added pywin32 to Path (worth a try)
tried "from win32 import win32gui"
Any help would be appreciated!
Requested commands with output:
importing win32api and win32com results in the same out of
ModuleNotFoundError: No module named 'win32api'
ModuleNotFoundError: No module named 'win32com'
python -m pip install pywin32
Requirement already satisfied: pywin32 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (304.0)
python -c "import win32gui" -- nothing happens when i run this line in a cmd (maybe i have done something wrong here?)
Solution unknown however it was fixed by simply recreating the virtual environment and installing the pywin32.
I use computer that is Window 10 and my Python version is 3.6.
I installed pymysql and MySQLdb as in the picture below.
But When I tried to run python, I got this error : No module named 'pymysql'
also, MySQLdb...
How can I solved it?
Try to use pip3 install PyMySQL and import pymysql
Today I was tried start my python web project by python manage.py runserver
and get error:
ImportError: No module named unicodedata
When I tried to find solution of my problem I get some another errors.
I try pip install unicodedata and get
Fatal error in launcher: Unable to create process using '"'
Then I try python -m pip install unicodedata
LookupError: unknown encoding: idna
So I try >>>import encodings.idna but have error again:
ImportError: No module named unicodedata
My python: 2.7.12.
I tried to reinstall it, but it's did not help me
So, this is my problem.
Did you try to import unicodedata2?
Then do import unicode. It works for me.
I did not solved this problem with python 2.7.12 and try to install python 3.6.1. Now it's working correctly.