bash: pip: command not found...

 

1、问题

[root@PC1 test2]# pip install numpy
bash: pip: command not found...

 

 

2、系统

[root@PC1 test2]# cat /etc/system-release
Rocky Linux release 8.5 (Green Obsidian)

 

 

3、python版本

[root@PC1 test2]# python --version
Python 3.6.8

 

 

4、解决方法

复制代码
[root@PC1 software]# ls
[root@PC1 software]# wget https://bootstrap.pypa.io/pip/3.6/get-pip.py
--2022-06-02 13:46:40--  https://bootstrap.pypa.io/pip/3.6/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.76.175, 2a04:4e42:12::175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.76.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2159061 (2.1M) [text/x-python]
Saving to: ‘get-pip.py’

get-pip.py                        100%[==========================================================>]   2.06M  18.8KB/s    in 2m 14s

2022-06-02 13:48:56 (15.7 KB/s) - ‘get-pip.py’ saved [2159061/2159061]

[root@PC1 software]# ls
get-pip.py
[root@PC1 software]# python3 get-pip.py
Collecting pip<22.0
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 12 kB/s
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
  Attempting uninstall: pip
    Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-21.3.1 wheel-0.37.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[root@PC1 software]# pip --version
pip 21.3.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
复制代码

 

 

5、测试pip命令

[root@PC1 software]# pip install numpy
Collecting numpy
  Downloading numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl (14.8 MB)
     |████████████████████████████████| 14.8 MB 14 kB/s
Installing collected packages: numpy
Successfully installed numpy-1.19.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

 

posted @   小鲨鱼2018  阅读(1963)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-06-02 c语言中strncp函数,函数原型、头文件
2021-06-02 c语言中strcpy函数,函数原型、头文件
2021-06-02 c语言 11-6
2021-06-02 c语言 11-5
2021-06-02 c语言 11-4
2021-06-02 c语言中求字符串的长度
2021-06-02 c语言 11-3
点击右上角即可分享
微信分享提示