Made apt work I put pip I put pyenv I can't install python! ← here
$ pyenv install 3.7.4
Downloading Python-3.7.4.tar.xz...
-> https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
Installing Python-3.7.4...
BUILD FAILED (Ubuntu 16.04 using python-build 1.2.21)
Inspect or clean up the working tree at /tmp/python-build.20201015120257.27370
Results logged to /tmp/python-build.20201015120257.27370.log
Last 10 log lines:
sys.exit(ensurepip._main())
File "/tmp/python-build.20201015120257.27370/Python-3.7.4/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/tmp/python-build.20201015120257.27370/Python-3.7.4/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/tmp/python-build.20201015120257.27370/Python-3.7.4/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1132: recipe for target 'install' failed
make: *** [install] Error 1
"A story about stumbling on building a pyenv 3.7-based environment on Ubuntu 16.04" https://qiita.com/kenta_ojapi/items/6b19e0c05b268f3e74da
"[Pyenv] Building a python environment with ubuntu 16.04" https://qiita.com/banaoh/items/00aea13fe045fab7e8ba
$ 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 git
It is said that you should look at https://github.com/pyenv/pyenv/wiki/Common-build-problems, so solve it with the following command described here. Believe in the comment and chanting. I don't understand the contents at all, but it will install what you need.
Python installation failed again. It is said that there is no zlib, so install it
sudo apt-get install zlib1g-dev
Installation failed. It takes a lot of time, but it hurts to fail after all.
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
So I installed bzip2 lib individually.
Then it worked.
Installed Python-3.7.4
There is no sense of accomplishment when I see it.
I worked and wrote so far with the tension that seems to have reached the goal, The goal is to create something using the API, so I've only finally arrived at the start.
In addition, it is necessary to be enthusiastic and face each other.
Recommended Posts