Python的编译安装

 

到 Python 官网下载 Python3

curl -O https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

  

安装依赖

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

  

configure

sudo ./configure --enable-optimizations --prefix=/PATH/TO/BIN

  

make 

 

make test

 

sudo checkinstall

 

posted @ 2019-09-02 02:41  jack-kaller  阅读(350)  评论(0编辑  收藏  举报