You can install Python-3.6 on Debian 8 as follows:

It is recommended to use make altinstall according to the official website.

If you want pip to be included, you need to add --with-ensurepip=install to your configure call. For more details see ./configure --help.

Warning: make install can overwrite or masquerade the python binary. make altinstall is therefore recommended instead of make install since it only installs exec_prefix/bin/pythonversion.

Some packages need to be installed to avoid some known problems, see: Common build problems(updated)

Ubuntu/Debian:

Alternative of libreadline-dev:

Fedora/CentOS/RHEL(aws ec2):

Alternative of openssl-devel:

Update

You can download the latest python-x.y.z.tar.gz from here.

To set a default python version and easily switch between them , you need to update your update-alternatives with the multiple python version.

Let’s say you have installed the python3.7 on debian stretch , use the command whereis python to locate the binary (*/bin/python). e,g:

Add the python versions:

The python3.7 with the 50 priority is now your default python , the python -V will print:

To switch between them, use:

Sample output:

Refer: https://unix.stackexchange.com/questions/332641/how-to-install-python-3-6

分类: PYTHON

0 条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据