質問するログイン新規登録

回答編集履歴

2

追記

2017/11/26 22:41

投稿

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

1

追記

2017/11/26 22:41

投稿

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