我试图通过将 Python 字符串列表从 UTF-8 转换为 ASCII 来从字符串列表中删除重音符号。我在 StackOverflow 中阅读了多个问题的答案,这些问题建议使用 unidecode 包中的 unidecode 函数。我已经使用 conda 安装了它,但是如果我写
import unidecode
Run Code Online (Sandbox Code Playgroud)
我得到
ModuleNotFoundError: No module named 'unidecode'
Run Code Online (Sandbox Code Playgroud)
我已经尝试排除 unidecode 并重新安装它(同时使用 conda 和 pip),我检查它是否PATH指向所有 Anaconda 位置,如Alexander McFarlane对此问题的回答中所述。