在 Debian8 Jessie 上安装 Python 3.6

And*_*nko 6 make debian python3

Debian8 自带 Python 3.4,但我需要安装 3.6 版本。我想知道这可能吗?因为我失败了很多次。

我已经尝试过 (如何安装 Python 3.6 ) 中提到的选项,但是对于make -j8步骤,我收到了大量以下错误:

libpython3.6m.alibpython3.6m.a((descrobject.ocompile.o))::  InIn  functionfunction `getset_get_doc':
/root/python3/Python-3.6.3/Objects/descrobject.c:438: undefined reference to `__gcov_indirect_call_profiler_v2'
/root/python3/Python-3.6.3/Objects/descrobject.c:438: undefined reference to `__gcov_indirect_call_callee'
/root/python3/Python-3.6.3/Objects/descrobject.c:438: undefined reference to `__gcov_time_profiler'
libpython3.6m.a(descrobject.o): In function `member_get_doc':
/root/python3/Python-3.6.3/Objects/descrobject.c:422: undefined reference to `__gcov_indirect_call_profiler_v2'
/root/python3/Python-3.6.3/Objects/descrobject.c:422: undefined reference to `__gcov_indirect_call_callee'
/root/python3/Python-3.6.3/Objects/descrobject.c:422: undefined reference to `__gcov_time_profiler'
Run Code Online (Sandbox Code Playgroud)

等等...

我不想使用“ http://ftp.de.debian.org/debian testing main”,因为它包含实验包,我不确定这是否是用于生产的正确版本。

我也试过用 Debian 9 做同样的事情,但遇到了类似的问题。

Jam*_*sey 5

我不得不这样做,我发现每当我从源代码构建 python 时,我都会遇到很多问题(最烦人的两个是按下向上键时没有历史记录并且 _sqlite 模块不可用!两者都可以修复,但这只是烦人必须修复它们)。

因此,要回答您的问题,最好的方法是添加 Felix Krull 的 deadsnakes PPA: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa;

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
Run Code Online (Sandbox Code Playgroud)

J Fernyhough 的 PPA 位于:
https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6;

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
Run Code Online (Sandbox Code Playgroud)

python3然后我们不打电话而是打电话python3.6


由于 Ubuntu 是基于 Debian 的,只要你有一个标准安装,添加 Ubuntu PPA 对我来说总是很有效。我曾在 Linux Mint 18.1、18.3 和我不记得的 Debian 版本上使用过它,但从未遇到过任何问题。

  • @AlexPoca 14.04 trusty = jessie / sid <<<--- trusty是jessie https://askubuntu.com/questions/445487/what-debian-version-are-the- Different-ubuntu-versions-based-on ..除此之外,重点是它可以安装并且工作得很好! (2认同)