TL;DR There were other files that should be ʻapt get`. I will write it very roughly.
$ python3 -V
3.5.3
pyenv install 3.7.3
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(pyenv init -)"' >> ~/.profile
$ source ~/.profile
jrny@iris:~/Iris$ pyenv install 3.7.3
Downloading Python-3.7.3.tar.xz...
-> https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
Installing Python-3.7.3...
BUILD FAILED (Debian 9.11 using python-build 1.2.16-1-g4500a33c)
Inspect or clean up the working tree at /tmp/python-build.20200112073219.22183
Results logged to /tmp/python-build.20200112073219.22183.log
Last 10 log lines:
sys.exit(ensurepip._main())
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1130: recipe for target 'install' failed
make: *** [install] Error 1
Something went wrong, so Look at the error log.
/tmp/python-build.20200112073219.22183.log
I've collected logs in, so I took a look.
Last 10 log lines:
sys.exit(ensurepip._main())
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/tmp/python-build.20200112073219.22183/Python-3.7.3/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1130: recipe for target 'install' failed
make: *** [install] Error 1
understood. GCE was so easy.
$ sudo apt update
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl
Anyway, I'll put in various things.
It went well.
Recommended Posts