开发者社区> 问答> 正文

Linux系统安装Python3.5.1,make步骤报错,操作系统suse server 10

Linux系统安装Python3.5.1,make步骤报错
因为主机无法链接外网,所以只能使用通过编译源码的方式进行安装,再make步骤上爆出了下面的错误。麻烦各位大神指点一下。

ranlib libpython3.5m.a
gcc -pthread   -Xlinker -export-dynamic -o python Programs/python.o libpython3.5m.a -lpthread -ldl  -lutil -lrt   -lm  
./python -E -S -m sysconfig --generate-posix-vars ;\
 if test $? -ne 0 ; then \
  echo "generate-posix-vars failed" ; \
  rm -f ./pybuilddir.txt ; \
  exit 1 ; \
 fi
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: unknown encoding: GB18030

Current thread 0x00002b521aa8a330 (most recent call first):
/bin/sh: line 5:  2604 已放弃                  ./python -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [pybuilddir.txt] 错误 1  
已经解决
在 ./configure 操作前,先进行配置

export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN.UTF-8

问题解决来源: http://bbs.chinaunix.net/thread-3757465-1-1.html

展开
收起
a123456678 2016-06-24 14:32:21 11411 0
1 条回答
写回答
取消 提交回答
  • 直接安装pyenv,然后安装对应版本的anaconda吧,这个方案是我现在试过最佳的解决方案。

    2019-07-17 19:46:56
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载