Welcome to OGeek Q&A 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...