aix6.1 上的 python3.2 错误
我在aix6.2服务器上编译了python3.2,但它不起作用。像这样的弹出错误
Fatal Python error: Py_Initialize: Unable to get the locale encoding
UnicodeEncodeError: 'filesystemencoding' codec can't encode character '\uda18' in position 28: Invalid wide character
IOT/Abort trap(coredump)
欢迎任何帮助。
xxxxxxxxxxxxxx
/home/hei/bin>echo LANG:$LANG LC_CTYPE:$LC_CTYPE
LANG:Zh_CN.gbk LC_CTYPE:
/home/hei/bin>export LANG=en_US.utf-8 && ./python3 找不到平台无关的库 找不到平台相关库 考虑将 $PYTHONHOME 设置为 [:] ==================代码集[ISO8859-1] ==================CODESET[]
编码[ISO8859-1]运行_PyCodec_Lookup错误 致命 Python 错误:Py_Initialize:无法获取区域设置编码 UnicodeEncodeError:“filesystemencoding”编解码器无法对位置 29 中的字符“\uda18”进行编码:宽字符无效 IOT/Abort trap(coredump)
/home/hei/bin>export LANG=en_US.utf-8 &&导出 PYTHONHOME=. && ./python3 ==================代码集[ISO8859-1] ==================代码集[] 编码[ISO8859-1]运行_PyCodec_Lookup错误 致命 Python 错误:Py_Initialize:无法获取区域设置编码 UnicodeEncodeError:“filesystemencoding”编解码器无法对位置 2 中的字符“\uda18”进行编码:宽字符无效 IOT/中止陷阱(coredump)
i compiled python3.2 on aix6.2 server, but it doesnt work. Pop error like this
Fatal Python error: Py_Initialize: Unable to get the locale encoding
UnicodeEncodeError: 'filesystemencoding' codec can't encode character '\uda18' in position 28: Invalid wide character
IOT/Abort trap(coredump)
Any help is welcome.
xxxxxxxxxxxxxx
/home/hei/bin>echo LANG:$LANG LC_CTYPE:$LC_CTYPE
LANG:Zh_CN.gbk LC_CTYPE:
/home/hei/bin>export LANG=en_US.utf-8 && ./python3
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
==================codeset[ISO8859-1]
==================CODESET[]
encoding[ISO8859-1]run _PyCodec_Lookup ERROR
Fatal Python error: Py_Initialize: Unable to get the locale encoding
UnicodeEncodeError: 'filesystemencoding' codec can't encode character '\uda18' in position 29: Invalid wide character
IOT/Abort trap(coredump)
/home/hei/bin>export LANG=en_US.utf-8 && export PYTHONHOME=. && ./python3
==================codeset[ISO8859-1]
==================CODESET[]
encoding[ISO8859-1]run _PyCodec_Lookup ERROR
Fatal Python error: Py_Initialize: Unable to get the locale encoding
UnicodeEncodeError: 'filesystemencoding' codec can't encode character '\uda18' in position 2: Invalid wide character
IOT/Abort trap(coredump)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能需要大量的逐步调试,因为我无法想象该代理角色来自哪里。
首先,在 shell 中执行以下操作:
请使用此命令的输出更新您的问题。
我建议您使用 UTF-8 编码(例如
en_US.UTF-8
)(如果尚未使用),然后重试运行 Python。也有可能您拥有的 Python 源代码不够新,并且没有针对 this (实际上是 那个)错误。
This might need a lot of step by step debugging, since I can't imagine where that surrogate character came from.
First, do the following in your shell:
Please update your question with the output of this command.
I suggest you use an encoding that is UTF-8 (e.g
en_US.UTF-8
) if not already, and retry running Python.It is also possible that the Python source code you have is not recent enough and is not patched for this (which actually is that) bug.