TL;DR Il y avait d'autres fichiers qui devraient être ʻapt get`. Je vais l'écrire très grossièrement.
$ 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
Quelque chose s'est mal passé, alors Regardez le journal des erreurs.
/tmp/python-build.20200112073219.22183.log
J'ai collecté des identifiants, alors j'ai jeté un coup d'œil.
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
compris. GCE était si facile.
$ 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
Quoi qu'il en soit, je vais mettre diverses choses.
Ça s'est bien passé.