Linux 安装 Python 包管理工具 Pip
pip 是一个常用的 Python 包管理工具,主要是用于安装 PyPI 上的软件包,可以替代 easy_install 工具。
在 Centos 7 中安装 Python 包管理工具—Pip 时,使用 sudo yum install python-pip 时无法安装,是由于 Centos 发行版的源内容更新的比较滞后,导致找不到 python-pip 这个包管理工具。
这里解决的是无法安装 pip 时问题,或者说是如何在 Centos 7 中安装 Python 包管理工具 Pip 。
一、脚本安装 pip
首先下载 get-pip.py 脚本,然后运行即可安装:
$ curl -O https://bootstrap.pypa.io/get-pip.py $ python get-pip.py
二、使用包管理软件安装
1、首先安装 epel 扩展源:
$ sudo yum -y install epel-release
2、然后安装 python-pip
$ sudo yum -y install python-pip
三、其他 linux 中安装 Pip
1、Debian/Ubuntu
sudo apt-get install python-pip
2、Fedora
Fedora 21:
Python 2:
sudo yum upgrade python-setuptools sudo yum install python-pip python-wheel
Python 3:
sudo yum install python3 python3-wheel
Fedora 22:
Python 2:
sudo dnf upgrade python-setuptools sudo dnf install python-pip python-wheel
Python 3:
sudo dnf install python3 python3-wheel
3、openSUSE
Python 2: sudo zypper install python-pip python-setuptools python-wheel Python 3: sudo zypper install python3-pip python3-setuptools python3-wheel
4、Arch Linux
Python 2: sudo pacman -S python2-pip Python 3: sudo pacman -S python-pip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论