python在命令提示符下 [英] python at command prompt

查看:97
本文介绍了python在命令提示符下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是python新手,命令提示符有问题

python。我在我的Windows机器上安装了python 2.4.4,打开了一个

命令提示符窗口,并输入了python以启动交互模式。

出现以下错误。


D:\> python

''python''不被识别为内部或外部命令,

可操作程序或批处理文件。


以下程序工作正常

IDLE(Python GUI)

Python(命令行)

PythonWin


由于一些奇怪的原因,在命令

提示符下无法识别python。

有没有人有关于为什么会发生这种情况的任何想法?

谢谢,

Hi,
I am python newbie and the command prompt is having an issue with
python. I installed python 2.4.4 onto my windows machine, opened a
command prompt window, and typed python to start the interactive mode.
Got the following error.

D:\>python
''python'' is not recognized as an internal or external command,
operable program or batch file.

The following programs work fine
IDLE (Python GUI)
Python (command line)
PythonWin

For some strange reason, python is not recognized at the command
prompt.
Does anyone have any ideas as to why this is happening?
thanks,

推荐答案

D:\> python
D:\>python

''python''不被识别为内部或外部命令,

可操作程序或批处理文件。
''python'' is not recognized as an internal or external command,
operable program or batch file.



[snip]

[snip]


由于某些奇怪的原因,命令无法识别python

提示。
For some strange reason, python is not recognized at the command
prompt.



听起来你的路径设置不正确。请参阅第一部分

here [1] onFinding python.exe


-tkc


[1] http://www.imladris.com/Scripts/PythonForWindows.html

Sounds like your path isn''t set correctly. See the first section
here[1] on "Finding python.exe"

-tkc

[1]http://www.imladris.com/Scripts/PythonForWindows.html


[snip]
[snip]

听起来你的路径设置不正确。请参阅第一部分

here [1] onFinding python.exe


-tkc


[1] http://www.imladris.com/Scripts/PythonForWindows.html
Sounds like your path isn''t set correctly. See the first section
here[1] on "Finding python.exe"

-tkc

[1]http://www.imladris.com/Scripts/PythonForWindows.html



谢谢Tim,

我将pythonpath设置为python解释器所在的位置C:

\Python24

但是我仍然得到相同的错误消息。还有别的东西

必须配置吗?

谢谢。

Thanks Tim,
I set the pythonpath to where the python interpreter is located C:
\Python24
However I still get the same error message. Is there something else
that must be configured?
thanks.


* c3 ***** @ hotmail.com 写道(2007年11月1日上午9:58):
* c3*****@hotmail.com wrote (on 11/1/2007 9:58 AM):

[snip]
[snip]

>听起来你的路径设置不正确。请参阅第一部分
此处[1]上的查找python.exe

-tkc

[1] http://www.imladris.com /Scripts/PythonForWindows.html
>Sounds like your path isn''t set correctly. See the first section
here[1] on "Finding python.exe"

-tkc

[1]http://www.imladris.com/Scripts/PythonForWindows.html



谢谢Tim,

我将pythonpath设置为python解释器所在的位置C:

\Python24

但是我仍然收到相同的错误消息。还有别的东西

必须配置吗?

谢谢。


Thanks Tim,
I set the pythonpath to where the python interpreter is located C:
\Python24
However I still get the same error message. Is there something else
that must be configured?
thanks.



这不是PYTHONPATH需要设置的环境变量。


您需要将PATH环境变量设置为包含C:\Python24。

这是Python可执行文件的位置找到了。


Mark

It''s not the PYTHONPATH environment variable that you need to set.

You need to set the PATH environment variable to include C:\Python24.
That is where the Python executable is locate.

Mark


这篇关于python在命令提示符下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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