python - ValueError:未知语言环境:用于导入 spacy 的 UTF-8
问题描述
当我在 mac 上导入 spacy (python) 时,给我 ValueError: unknown locale: UTF-8 我找到对我说的答案:他说:我在下面写推荐
$ .bash_profile
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8
但它不起作用。
解决方案
我找到了答案:当我写信~/.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
并运行....
推荐阅读
- php - 如何在模型中获取laravel中的总和列值?
- php - 如何从加入的mysql查询中分离值并防止重复结果
- angular - 角度视图渲染性能
- laravel-5 - Laravel api 检查记录失败
- haskell - Haskell 错误“数据构造函数不在范围内”
- google-cloud-platform - 项目计费经理与计费帐户用户 GCP
- assembly - ARM 汇编的 Cortex-M3/M4 定时器中断
- sql-server - 如何仅对差异为零的记录求和
- javascript - 如果执行者没有解决 ES6 JavaScript 承诺,它可以被其他任何东西解决吗?
- c# - 不能使用服务容器中的服务和默认值来实例化“MyProject.Response”类型的构造函数