linux安装python3和pip

##安装python3简明步骤

下载python3
# wget -O /opt/Python-3.6.5.tar.xz https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
# tar xf /opt/Python-3.6.5.tar.xz -C /opt/
# cd /opt/Python-3.6.5

安装python3
# ./configure --prefix=/usr/local/python3.6
# make && make install

创建软连接
# ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3

检测
# python3

注意:其实安装python3的时候,也顺带把pip一起给安装了。
创建pip的软连接
#ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3
pip3 install readline

你可能感兴趣的:(杂项记录,linux,pip,python)