欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

centos下pip安装

程序员文章站 2022-12-01 17:30:24
1,下载pip [root@localhost ~]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py % Total % Received % Xferd Average Speed Time Time Time Current Dl ......

1,下载pip

[root@localhost ~]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1738k 100 1738k 0 0 456k 0 0:00:03 0:00:03 --:--:-- 456k

2,安装pip

root@localhost ~]# chmod a+x get-pip.py

root@localhost ~]#python get-pip.py

Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 480kB/s
Collecting setuptools
Downloading setuptools-39.0.1-py2.py3-none-any.whl (569kB)
100% |████████████████████████████████| 573kB 2.2MB/s
Collecting wheel
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |████████████████████████████████| 51kB 2.7MB/s
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-9.0.3 setuptools-39.0.1 wheel-0.30.0

3,测试安装

[root@localhost ~]# pip install numpy
Collecting numpy
Downloading numpy-1.14.2-cp27-cp27mu-manylinux1_x86_64.whl (12.1MB)
100% |████████████████████████████████| 12.1MB 82kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.2

[root@localhost ~]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>