如何将pip3命令更改为pip? [英] How to change pip3 command to be pip?

查看:973
本文介绍了如何将pip3命令更改为pip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我卸载了pip,而是安装了pip3.现在,我只想通过键入pip来使用pip3.原因是我只习惯键入pip,并且每个指南都使用pip命令,因此,每次我要复制和粘贴命令时,都必须将pip修改为pip3,这会浪费时间.当我键入pip时,我遇到一个错误,该错误是pip: command not found,这意味着未执行pip命令.可以使pip指向pip3吗?

I uninstalled pip, and I installed pip3 instead. Now, I want to use pip3 by typing pip only. The reason is I am used to type pip only and every guide uses the pip command, so every time I want to copy and paste commands, I have to modify pip to pip3 which wastes time. When I type pip I have an error which is pip: command not found which means pip command is not taken. Is it possible to make pip points to pip3?

推荐答案

您可以将别名添加到〜/.bashrc

you can either add alias to your ~/.bashrc

alias pip=pip3

或添加到名为pip的$ PATH符号链接中,该链接指向pip3二进制文件

or add to your $PATH symlink named pip pointing to pip3 binary

(顺便说一句,即使有关pip的问题也不是真正与python相关的问题,所以您应该重新标记它)

(btw, this even though concerning pip isn't really python related question, so you should retag it)

这篇关于如何将pip3命令更改为pip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆