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, ...
- 解决办法:
- 在
.bash_profile
中添加如下两行——设置编码:
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
- 执行
source .bash_profile
来让设置生效, - 退出 PyCharm 后再重新打开项目