私はantiX 19.3にPython 3.9をインストールしようとしました。私がフォローしたガイドは次のとおりです。ここ。私のインストールの違いは次のとおりです。
sudo apt-get install build-essential
sudo apt-get install libsqlite3-dev
sudo apt-get install libbz2-dev
次のコマンドを除いて、初期プロセスはスムーズに進行しました。
sudo make install
ログファイルが貼り付けられました。ゼロボックス(サイズ制限についてPastebinに感謝!) https://www.i1984.cz/paste/?ef63821f80bdba6f#tViAQ43HnOT6nqMq6V9rFclUig+/lVR/m+SDolo3nQI=
ログの最後の部分:
rm -f /usr/local/share/man/man1/python3.1
(cd /usr/local/share/man/man1; ln -s python3.9.1 python3.1)
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Traceback (most recent call last):
File "<frozen zipimport>", line 520, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen zipimport>", line 568, in _get_data
File "<frozen zipimport>", line 523, in _get_decompress_func
zipimport.ZipImportError: can't decompress data; zlib not available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/home/alex/Downloads/Python-3.9.0/Lib/runpy.py", line 206, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/home/alex/Downloads/Python-3.9.0/Lib/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/home/alex/Downloads/Python-3.9.0/Lib/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "<frozen zipimport>", line 241, in load_module
File "<frozen zipimport>", line 709, in _get_module_code
File "<frozen zipimport>", line 570, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available
Traceback (most recent call last):
File "/home/alex/Downloads/Python-3.9.0/Lib/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/alex/Downloads/Python-3.9.0/Lib/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/alex/Downloads/Python-3.9.0/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/home/alex/Downloads/Python-3.9.0/Lib/ensurepip/__init__.py", line 210, in _main
return _bootstrap(
File "/home/alex/Downloads/Python-3.9.0/Lib/ensurepip/__init__.py", line 129, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/home/alex/Downloads/Python-3.9.0/Lib/ensurepip/__init__.py", line 38, in _run_pip
return subprocess.run([sys.executable, "-c", code], check=True).returncode
File "/home/alex/Downloads/Python-3.9.0/Lib/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/alex/Downloads/Python-3.9.0/python', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmphhr5gs_j/setuptools-49.2.1-py3-none-any.whl\', \'/tmp/tmphhr5gs_j/pip-20.2.3-py2.py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmphhr5gs_j\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:1254: install] Error 1
make exited with status code 2
Mon Nov 30 15:43:51 2020
----------------
答え1
Debian ベースのシステムで Python をビルドするには、次のパッケージをインストールする必要があります。
sudo apt-get install -y 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
libreadline-devの代替案:
sudo apt install libedit-dev