Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

jupyter notebook - Import error whlie importing 'emoji' package in python

I am facing the following import error while importing 'emoji' package in python :

ImportError Traceback (most recent call last) in ----> 1 import emoji

~Anaconda3libsite-packagesemoji_init_.py in 16 17 ---> 18 from emoji.core import * 19 from emoji.unicode_codes import * 20

~Anaconda3libsite-packagesemojicore.py in 14 import sys 15 ---> 16 from emoji import unicode_codes 17 18 all = [

ImportError: cannot import name 'unicode_codes' from 'emoji' (C:UsersKUSHAnaconda3libsite-packagesemoji_init_.py)

I am working on Windows 10. What should I do in order to rectify this? Thanks in advance.

question from:https://stackoverflow.com/questions/65857582/import-error-whlie-importing-emoji-package-in-python

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try to reinstall the 'emoji' package. The steps are

git clone https://github.com/carpedm20/emoji.git
cd emoji
python setup.py install

if you're working on Linux ubuntu.

But, you're working on Windows so that you have to access this link Emoji Github and then down load the files. Then, on your command prompt(cmd window), you should be in your folder for you to download it using cd command.

Finally, you can execute this.

python setup.py install

If it doesn't work, you can execute this too(if you have pip).

pip install unidecode

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...