I am trying to install Python 3.7.1 so I wont break the system, but pyenv always get error. I installed pyenv per this link:How do I install Python 3.6 using apt-get?
Where it says install pyenv and it seems to work, but fails to install Python3.7.1
Can someone please help me? what is the next step to find the problem?
$ pyenv install 3.7.1
Downloading Python-3.7.1.tar.xz...
-> https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
Installing Python-3.7.1...
BUILD FAILED (Ubuntu 18.04 using python-build 1.2.8)
Inspect or clean up the working tree at /tmp/python-build.20181117140343.4690
Results logged to /tmp/python-build.20181117140343.4690.log
Last 10 log lines:
File "/tmp/tmpgu4s65ck/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/__init__.py", line 42, in
File "/tmp/tmpgu4s65ck/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/cmdoptions.py", line 16, in
File "/tmp/tmpgu4s65ck/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 25, in
File "/tmp/tmpgu4s65ck/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/download.py", line 39, in
File "/tmp/tmpgu4s65ck/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", line 3, in
File "/tmp/python-build.20181117140343.4690/Python-3.7.1/Lib/ctypes/__init__.py", line 7, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Makefile:1122: recipe for target 'install' failed
make: *** [install] Error 1