This topic created in 2440 days ago, the information mentioned may be changed or developed.
每次登录显示这种问题
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: ulimit: open files: cannot modify limit: Operation not permitted
然后运行 python 文件 打印中文日志就会出现
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)
这种该怎么设置正常呀 用 python 打印出来的系统编码是 ANSI 这种
1 replies 2019-08-25 11:14:02 +08:00  | | 1 iUnix Aug 25, 2019 via Android 登录提示的问题跟你 python 的问题无关。 1,安装相应 locale 或者将 locale 设置为你系统现有的 2,应该某个地方如~/.profile 运行了 ulimit,而你这个用户没权限
python 设置用 utf8 试试。 |