linux下安装python3.6
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
一、安装python3.6
1. 安装依赖环境
# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
2.下载Python3
https://www.python.org/downloads/
|
1
|
# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
|
3.安装python3
我个人习惯安装在/usr/local/python3(具体安装位置看个人喜好)
创建目录:
|
1
|
# mkdir -p /usr/local/python3
|
解压下载好的Python-3.x.x.tgz包(具体包名因你下载的Python具体版本不不同⽽而不不同,如:我下载的是Python3.6.1.那我这里就是Python-3.6.1.tgz)
|
1
|
# tar -zxvf Python-3.6.1.tgz
|
4.进入解压后的目录,编译安装。
|
1
2
|
# cd Python-3.6.1
# ./configure --prefix=/usr/local/python3
|
make
|
1
|
# make
|
make install
|
1
|
make install 或者 make && make install
|
5.建立python3的软链
|
1
|
# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
|
6.并将/usr/local/python3/bin加入PATH
|
1
2
3
4
5
6
7
8
9
|
# vim ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ - f ~ / .bashrc ]; then
. ~ / .bashrc
fi
# User specific environment and startup programs
PATH = $PATH:$HOME / bin : / usr / local / python3 / bin
export PATH
|
按ESC,输入:wq回车退出。
修改完记得执行行下面的命令,让上一步的修改生效:
|
1
|
# source ~/.bash_profile
|
检查Python3及pip3是否正常可用:
|
1
2
3
4
|
# python3 -V
Python 3.6 . 1
# pip3 -V
pip 9.0 . 1 from / usr / local / python3 / lib / python3. 6 / site - packages (python 3.6 )
|
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)