当前位置: 代码迷 >> 综合 >> Mac下PyCharm运行Flask报错RuntimeError: Click will abort further
  详细解决方案

Mac下PyCharm运行Flask报错RuntimeError: Click will abort further

热度:82   发布时间:2023-11-17 08:09:47.0

Mac下PyCharm运行Flask报错RuntimeError: Click will abort further

报错:

RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. This system lists a couple of UTF-8 supporting locales that
you can pick from.  The following suitable locales where
discovered: ..., en_NZ.UTF-8, en_US.UTF-8, ...
  • 解决办法:
  1. .bash_profile 中添加如下两行——设置编码:
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
  1. 执行 source .bash_profile 来让设置生效,
  2. 退出 PyCharm 后再重新打开项目
  相关解决方案