3

Redhat/Centos/Fedora 下 Python, Pip 和 Git 的安装

 3 years ago
source link: https://python.freelycode.com/contribution/detail/284
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Redhat/Centos/Fedora 下 Python, Pip 和 Git 的安装
软件下载及安装
Redhat/Centos/Fedora 下 Python, Pip 和 Git 的安装

如果你使用root帐户,那么下面(sudo)则可以省略。如果非root帐户,则(sudo)表示在命令前加sudo。

对于fedora/centos/redhat安装依赖:

(sudo) yum install -y gcc openssl openssl-devel sqlite-devel xml2 libxml2-devel libxslt libxslt-devel python-pyasn1 libffi-devel python-pyasn1-modules

安装Python和Pip(Python3自带Pip)

wget https://qiniumedia.freelycode.com/pythona/software/python3.5.1/Python-3.5.1.tgz

tar xzvf Python-3.5.1.tgz

cd Python-3.5.1

./configure
make
(sudo) make install
cd ..

安装Git

wget https://qiniumedia.freelycode.com/pythona/software/git/git-2.8.3.zip

unzip git-2.8.3.zip

cd git-2.8.3

(sudo) yum install libcurl-devel

(sudo) yum install expat-devel perl-ExtUtils-MakeMaker

(sudo) make install

(sudo) rm /usr/bin/git

(sudo) ln  -s  <git-2.8.3源代码目录>/git  /usr/bin/git

git-2.8.3源代码目录指的是git-2.8.3那个目录的全路径,类似/root/git-2.8.3

如果你的系统是Fedora 22 或更新,使用下面命令

dnf install git

期望效果

install01.png

要求 Python >= 3.5, Git >= 1.8。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK