Django. ImportError: No module named unicodedata - python

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.

Related

ModuleNotFoundError: No module named 'win32.api'

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

ModuleNotFoundError: No module named 'pycoin'

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.

How to solve 'No module named pymysql'

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

How to use DNS resolver in Python 3?

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

ImportError: No module named setuptools

I am trying to import urllib.request on python, but when I try to do so, i get the following error: ImportError: No module named setuptools.
I tried doing 'sudo apt-get install -y python-setuptools' , but after doing so too I am getting the same error.
I am using PyCharm and my Python version is Python 2.7.12+.
Unless there is any specific requirement to use urllib. I suggest you use python-requests. Both do the same.

Categories

Resources