美文网首页
安装 pip3(centos 7.4)

安装 pip3(centos 7.4)

作者: 葬花逐流 | 来源:发表于2019-03-09 13:29 被阅读0次

安装 pip 用于快速导入 python 应用程序的依赖包。
按照 python官方文档 的安装方法,只需 2 步,so easy :

  1. Securely Download get-pip.py .
  2. Run python get-pip.py. This will install or upgrade pip. Additionally, it will install setuptoolsand wheel if they’re not installed already.

安装完后,在 /${python}/bin 目录下会看到 pip,为了使用方便,将 pip 加入环境变量:

$ vi /etc/profile

加入export PATH=/usr/local/python-3.7.2/bin/pip:$PATH
然后执行

$ source /etc/profile

或者在 /usr/bin 目录下做一个 pip 的符号链接:

$ ln -s /usr/local/python-3.7.2/bin/pip /usr/bin/pip

接下来就可以是用来 pip 安装 python 程序的依赖库了

$ pip install -r ./requirenment.txt

相关文章

网友评论

      本文标题:安装 pip3(centos 7.4)

      本文链接:https://www.haomeiwen.com/subject/mvespqtx.html