编程语言
首页 > 编程语言> > Debian系统安装python

Debian系统安装python

作者:互联网

EMR集群机器需要一个镜像,需要在Debian系统上安装Python

以下是安装python3.7.13的过程,踩了一些坑,搜了几篇大佬的博客顺利解决   1.在编译安装之前,我们需要先安装一些 Python 依赖包,参考文献 https://zihengcat.github.io/2017/07/06/compile-and-install-python-environment-in-linux-os/ 以下是Debian需要安装的,一定要提前安装,要不会各种报错 #/bin/bash     PYTHON_DEPS="zlib1g-dev \              libbz2-dev \              liblzma-dev \              uuid-dev \              libssl-dev \              libreadline-dev \              libncursesw5-dev \              libsqlite3-dev \              libffi-dev \              libgdbm-dev \              tk-dev              "     for i in ${PYTHON_DEPS} do     sudo apt-get -y install ${i} done     echo ${?}   2.安装并编译python tar xvf Python-3.7.13.tar.xz cd Python-3.7.13 ./configure --prefix=/usr/local/python3.7/ --enable-optimizations make && make install   1.设置默认python ln -s /usr/local/python3.7/bin/python3.7 /usr/bin/python   ln -s /usr/local/python3.7/bin/pip3.7 /usr/bin/pip 如果已存在,换成-sf   参考文献 https://blog.51cto.com/eholog/2341315

标签:bin,python,dev,python3.7,usr,安装,Debian
来源: https://www.cnblogs.com/smartcoding/p/16397846.html