Maison  >  Questions et réponses  >  le corps du texte

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

阿神阿神2721 Il y a quelques jours1714

répondre à tous(1)je répondrai

  • PHPz

    PHPz2017-04-17 17:12:31

    直接安装pyenv,然后安装对应版本的anaconda吧,这个方案是我现在试过最佳的解决方案。

    répondre
    0
  • Annulerrépondre