如何在Debian 8.5上从源代码构建Python

时间:2016-11-20 14:40:19

标签: python linux debian

我尝试从我的计算机上的源代码构建最新版本的Python(= 3.5.2)(运行Debian 8.5)。我在这里找到了提示:

SSL and Tkinter not present on source build of Python 3.5.2, Debian Linux

https://docs.python.org/devguide/setup.html#compiling-for-debugging

我做了以下事情:

 - $ sudo apt-get build-dep python3.5
 - $ sudo apt-get build-dep python3.4 (since python3.5 did not work)
 - Downloaded the tar.xz file from python.org
 - right click -> Extract here.
 - $ cd Python-3.5.2
 - $ ./configure
 - $ ./make
 - $./make test

运行make test后,我(其中包括):

[398/398] test_multiprocessing_fork
386 tests OK.
12 tests skipped:
    test_devpoll test_gdb test_kqueue test_msilib test_ossaudiodev
    test_startfile test_tix test_tk test_ttk_guionly test_winreg
    test_winsound test_zipfile64

现在我有以下问题:   - 如何在Debian 8.5上正确安装这个版本的Python?

1 个答案:

答案 0 :(得分:1)

这些是您需要消除所有not built警告的debian Dependencies。

sudo apt install libbz2-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libsqlite3-dev libssl-dev uuid-dev libreadline-dev zlib1g-dev tk-dev libffi-dev