There is no such name in Python 3, no. You are trying to run Python 2 code in Python 3. In Python 3, unicode has been renamed to str.
Python2 的unicode 函数在 Python3 中被命名为 str。在 Python3 中使用 ·str 来代替 Python2 中的 unicode.
python 2
unicode_str = unicode('中文', encoding='utf-8')
print unicode_str.encode('utf-8')
-------------------------------------------------------------
python3
e = '''我是一个中国人'''
print(e.encode('utf-8'), e.encode('utf-8').decode())