Alpine Linux 安装 python3.6
#
1: 下载 Code
$ wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
2: 准备环境
//gcc —version 检查是否已经安装 ,若 bash: gcc: command not found 说明没安装
apk add build-base //install GCC on Alpine Linux, apk add是安装命令,不同Linux,命令不同
apk add zlib-dev //install zlib-devel
3: Build Python
3.1:解压(在下载的目录下)
$ tar xvf Python-3.6.5.tgz
$ cd Python-3.6.5
3.2运行下面 ./configure :
$ ./configure —enable-optimizations —with-ensurepip=install
3.3 build Python(-j 为了并行编译) :
$ make -j 8
3.4 安装 Python 到/usr/local/bin:
$ sudo make altinstall
$ cd /usr/local/bin
$ ln -s python3.6 python
4: 检查 Python version:
$ python3.6 -V
Python 3.6.5
还没有评论,来说两句吧...