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