简体   繁体   English

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

[英]How to build Python from source on Debian 8.5

I tried to build the latest version of Python (= 3.5.2) from source on my computer (running Debian 8.5).我试图从我的计算机(运行 Debian 8.5)上的源代码构建最新版本的 Python(= 3.5.2)。 I found tips here:我在这里找到了提示:

SSL and Tkinter not present on source build of Python 3.5.2, Debian Linux , Python 3.5.2、Debian Linux 的源代码版本中不存在 SSL 和 Tkinter

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

I did the following:我做了以下事情:

 - $ 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

After running make test I got (among others):运行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

Now I have got the following question: - How to install this version of Python on Debian 8.5 correctly?现在我有以下问题: -如何在 Debian 8.5 上正确安装此版本的 Python?

这些是消除所有not built警告所需的 debian 依赖项。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM