【问题标题】:ValueError: unknown locale: UTF-8 for import spacyValueError:未知语言环境:用于导入 spacy 的 UTF-8
【发布时间】:2018-08-26 19:20:10
【问题描述】:

当我在 mac 上导入 spacy (python) 时,给我 ValueError: unknown locale: UTF-8 我找到了对我说的答案:他说: 我在下面写推荐

$ .bash_profile
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8

但它不起作用。

【问题讨论】:

    标签: python macos utf-8 spacy


    【解决方案1】:

    我找到了答案: 当我写~/.bash_profile 时给我:

    -bash: /Users/apple/.bash_profile: Permission denied
    

    但我应该写:

    $ sudo Console ~/.bash_profile 
    

    $ sudo edit ~/.bash_profile
    

    然后继续:

    $ export LC_ALL=en_US.UTF-8
    $ export LANG=en_US.UTF-8
    

    然后运行 ​​....

    【讨论】:

    • 在 ubuntu 中呢?
    猜你喜欢
    • 2016-02-16
    • 2015-10-02
    • 2013-11-26
    • 2016-08-01
    • 2016-12-19
    • 2016-06-25
    • 1970-01-01
    相关资源
    最近更新 更多