search

Home  >  Q&A  >  body text

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

Linux系统安装Python3.5.1,make步骤报错

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

<code>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 

</code>

已经解决

./configure 操作前,先进行配置

1

2

<code>export LANG=zh_CN.UTF-8

export LANGUAGE=zh_CN.UTF-8</code>

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

阿神阿神2932 days ago1822

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-17 17:12:31

    Install pyenv directly, and then install the corresponding version of anaconda. This solution is the best solution I have tried so far.

    reply
    0
  • Cancelreply