找不到命令Python2 [英] Command Python2 not found
本文介绍了找不到命令Python2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须在命令行中使用 Python2
执行以下命令: python2 -m pip install SomePackage
我得到的消息, Python2
没有找到,但我已经确定安装Python 2.7.1。
I have to use Python2
for the following command: python2 -m pip install SomePackage
in the command line. I get the message that Python2
is not found, but I have definitly installed Python 2.7.1.
当我运行 python --version
我得到输出 Python 3.5.1
。
When I run python --version
I get the output Python 3.5.1
.
编辑:
我使用Windows。还找不到命令 whereis
和 env
。
推荐答案
在windows下你必须使用:
Under windows you have to use:
py -2 yourfilename // for python2.x
py -3 yourfilename // for python3.x
这篇关于找不到命令Python2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文