安装成功,还是提示 pip 未找到
来源:3-9 Dockerfile实战
弱弱小乖乖
2020-08-26
sudo yum install python-pip 已经提示安装成功了,但是 使用 pip 命令,还是提示未找到 pip 命令,怎么办?
写回答
1回答
-
麦兜搞IT
2020-08-27
这个vagrant的centos7应该有python3了吧,我觉得应该你的系统python环境有点问题,看log你装的是python2的pip,您可以直接安装下python3,比如3.7以上,直接内置pip
比如
$ python3 -m pip install flask Collecting flask Downloading https://files.pythonhosted.org/packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl (94kB) 100% |████████████████████████████████| 102kB 1.9MB/s Collecting click>=5.1 (from flask) Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl Requirement already satisfied: Jinja2>=2.10.1 in ./Documents/PythonProjects/github/snmp-server/venv/lib/python3.7/site-packages (from flask) (2.11.2) Collecting Werkzeug>=0.15 (from flask) Downloading https://files.pythonhosted.org/packages/cc/94/5f7079a0e00bd6863ef8f1da638721e9da21e5bacee597595b318f71d62e/Werkzeug-1.0.1-py2.py3-none-any.whl (298kB) 100% |████████████████████████████████| 307kB 6.7MB/s Collecting itsdangerous>=0.24 (from flask) Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl Requirement already satisfied: MarkupSafe>=0.23 in ./Documents/PythonProjects/github/snmp-server/venv/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask) (1.1.1) Installing collected packages: click, Werkzeug, itsdangerous, flask Successfully installed Werkzeug-1.0.1 click-7.1.2 flask-1.1.2 itsdangerous-1.1.0 You are using pip version 18.1, however version 20.2.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
00
相似问题