简体   繁体   English

为什么我不能从命令提示符运行 python 代码?

[英]Why can't I run python code from my command prompt?

import : The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + import + ~~~~~~ + CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

You have to run the Python interpreter first.您必须先运行 Python 解释器。

Type "python" and hit Enter.输入“python”并按 Enter。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在命令提示符下运行Python代码 - Can't run Python code in Command Prompt 为什么我不能从Windows命令提示符运行python脚本? - Why can't I run a python script from the Windows Command Prompt? 为什么命令提示符下的“ pydoc -g”会弹出系统中安装的python库,但是我无法从Python解释器中执行该命令? - Why does “pydoc -g” at the command prompt bring up python libraries installed on my system, but I can't do that command from the Python Interpreter? 如何从我的终端/提示/shell 运行此代码 - How can I run this code from my terminal/prompt/shell 为什么我不能从另一个运行我的python文件? - Why can't I run my python file from another? 从Python命令行调用Python时,为什么Python无法找到并运行我的脚本? - Why can't Python find and run my scripts when calling Python from Python command line? 为什么我的代码无法在python上运行此代码? - Why can't my code run this code onto python? 为什么这在Python IDLE shell中有效,但在我从命令提示符下作为Python脚本运行时却没有? - Why does this work in the Python IDLE shell but not when I run it as a Python script from the command prompt? 为什么我的 python 代码在命令提示符下运行良好,但在 sublime 中运行不正常? - Why is my python code is running fine on command prompt but not running in sublime? 是否可以通过命令提示符从C#运行python代码? - Is this possible to run a python code from C# through command prompt?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM