If you want to touch Django and try to run it on Docker while studying the tutorial A story that required various preparations
--Use docker. The image of the container is centos7: latest --Install python uses pyenv in 3.5.2.
To do a Django tutorial, use pyenv in a docker container, When I tried to install and use python, I got an error, so I solved it little by little.
Anyone who wants to solve it should execute the following script on the container. https://github.com/tomokitamaki/BuildForDockercontPython/tree/master `For my convenience, Django will be installed. ``
--Solution below
[root@c72864a7fe2c ~]# yum install -y git
[root@c72864a7fe2c ~]# pyenv install 3.5.2
sha256sum: the --quiet option is meaningful only when verifying checksums
Try 'sha256sum --help' for more information.
Downloading Python-3.5.2.tar.xz...
-> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
Installing Python-3.5.2...
BUILD FAILED (CentOS Linux 7 using python-build 1.0.0-47-g5be82cb)
Inspect or clean up the working tree at /tmp/python-build.20160918121231.1047
Results logged to /tmp/python-build.20160918121231.1047.log
Last 10 log lines:
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/python-build.20160918121231.1047/Python-3.5.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[root@c72864a7fe2c ~]# cat /tmp/python-build.20160918121231.1047.log
--Solution below
[root@c72864a7fe2c ~]# yum install -y gcc
--Solution below
[root@c72864a7fe2c ~]# yum install -y make
# WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
--Solution below
[root@c72864a7fe2c ~]# yum install -y bzip2-libs.x86_64 bzip2 bzip2-devel.x86_64
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
--Solution below
[root@c72864a7fe2c ~]# yum install -y readline readline-devel.x86_64
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
--Solution below
[root@c72864a7fe2c ~]# yum install openssl openssl-devel.x86_64
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
--Solution below
[root@c72864a7fe2c ~]# yum install sqlite-devel.x86_64
Recommended Posts