【python基础】Linux环境下非root用户安装Python和第三方包

软件版本与下载地址:
python 3.7.3  

使用edwetl用户为例:

1.安装Python

软件上传地址为~/software 软件安装地址~/Python/Python3.7.3

(1)前置安装包查看

rpm -qa |grep -i zlib
rpm -qa |grep -i bzip2
rpm -qa |grep -i ncurses
rpm -qa |grep -i readline
rpm -qa |grep -i openssl
rpm -qa |grep -i xz
rpm -qa |grep -i sqlite
rpm -qa |grep -i gdbm
rpm -qa |grep -i tk
rpm -qa |grep -i gcc  #非常重要,而且单独安装非常麻烦需要1-2h

(2)安装Python

mkdir -p ~/software

上传安装软件到software目录

mkdir -p ~/Python/Python3.7.3

cd software

xz -d Python-3.7.3.tar.xz

tar -xvf Python-3.7.3.tar

cd Python-3.7.3

./configure --prefix=/home/edwetl/Python/Python3.7.3

make

make install

 

转载于:https://www.cnblogs.com/badboy200800/p/11532432.html

你可能感兴趣的:(python,数据库)