回答編集履歴

2

追記

2017/11/26 22:41

投稿

退会済みユーザー
test CHANGED
@@ -7,3 +7,91 @@
7
7
  OSはRedHat系のようですので、`cat /etc/redhat-release`の結果もあるとよいです。
8
8
 
9
9
  確か標準では無効だったかと思いますが、`getenforce`でSELinuxの状態も確認できればと思います。
10
+
11
+
12
+
13
+ ---
14
+
15
+ 追記:
16
+
17
+
18
+
19
+ 手元のVagrant環境でcentos/7 boxから環境を構築してみましたが、3.6.1は動作するようでした。
20
+
21
+ 構築時になんらかのエラーが発生していた可能性があるではないかと思います。
22
+
23
+ 最新は3.6.3のようですので、バージョンを上げてみることも試されるとよいのではないかと思います。
24
+
25
+
26
+
27
+ ```text
28
+
29
+ $ cat /etc/redhat-release
30
+
31
+ CentOS Linux release 7.4.1708 (Core)
32
+
33
+ $ sudo yum install git gcc zlib-devel openssl-devel
34
+
35
+ $ curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
36
+
37
+ # ここで環境変数設定あり
38
+
39
+ $ pyenv -v
40
+
41
+ pyenv 1.1.5
42
+
43
+ $ pyenv install 3.6.1
44
+
45
+ Downloading Python-3.6.1.tar.xz...
46
+
47
+ -> https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
48
+
49
+ Installing Python-3.6.1...
50
+
51
+ WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
52
+
53
+ WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
54
+
55
+ WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
56
+
57
+ Installed Python-3.6.1 to /home/vagrant/.pyenv/versions/3.6.1
58
+
59
+
60
+
61
+ $ pyenv versions
62
+
63
+ * system (set by /home/vagrant/.pyenv/version)
64
+
65
+ 3.6.1
66
+
67
+ $ pyenv global 3.6.1
68
+
69
+ $ pyenv versions
70
+
71
+ system
72
+
73
+ * 3.6.1 (set by /home/vagrant/.pyenv/version)
74
+
75
+ $ python --version
76
+
77
+ Python 3.6.1
78
+
79
+ $ python
80
+
81
+ Python 3.6.1 (default, Nov 26 2017, 22:19:01)
82
+
83
+ [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
84
+
85
+ Type "help", "copyright", "credits" or "license" for more information.
86
+
87
+ >>> print("Hello, world!")
88
+
89
+ Hello, world!
90
+
91
+ >>> quit()
92
+
93
+ $ which python
94
+
95
+ ~/.pyenv/shims/python
96
+
97
+ ```

1

追記

2017/11/26 22:41

投稿

退会済みユーザー
test CHANGED
@@ -1,3 +1,9 @@
1
+ OOMではない場合、SEGVや共有ライブラリ不足といった状況も考えられるかと思います。
2
+
3
+
4
+
1
5
  解決策ではないですが、`which python`、`strace python`の結果があると切り分けができるかと思います。
2
6
 
3
7
  OSはRedHat系のようですので、`cat /etc/redhat-release`の結果もあるとよいです。
8
+
9
+ 確か標準では無効だったかと思いますが、`getenforce`でSELinuxの状態も確認できればと思います。