pyhton出错:

python d:\test.py
File "<stdin>", line 1
python d:\test.py
^
SyntaxError: invalid syntax

原因:

出错是因为你已经进入python解释器,而不是 在cmd环境里

如果要运行helloworld.py这个文件,你需要在cmd里直接运行

显示是这样的

python d:\test.py File "<stdin>", line 1 python d:\test.py ^ SyntaxError: invalid syntax的更多相关文章

  1. Python 运行 Python hello.py 出错,提示: File "<stdin>" , line 1

    写了一个hello.py,仅有一句,print 'hello world', 运行 Python hello.py 出错,提示: File "<stdin>" , li ...

  2. 第一个Python程序hello.py提示出现File "<stdin>",line 1错误

    写第一个Python程序hello.py,内容仅有一句,print 'hello world', 运行 Python hello.py 出错,提示: File "<stdin>& ...

  3. File "<stdin>" , line 1

    写了一个hello.py,仅有一句,print 'hello world', 运行 Python hello.py 出错,提示: File "<stdin>" , li ...

  4. 使用python pip安装工具组件包:出现 requests File “<stdin>",line 1 pip install xxx ^ SyntaxError:invalid syntax

    最近想要试试python ,软件安装完成了,但是,import 组件包时,出了问题,一直不得解:安装pycharm 工具感觉麻烦,不想安装那些,只想单纯使用python . 问题复现: 1.Windo ...

  5. python 3.4.0 简单的print &#39;hello world&#39;,出错--SyntaxError: invalid syntax

    问题描写叙述: win7下安装的python 3.4.0版本号, 在命令行里写入简单的输出语句: print 'hello world' 然后enter,结果返回结果为: SyntaxError: i ...

  6. python中执行py文件出错(提示File “<stdin>”,line 1,SyntaxError:invalid syntax)

    解决办法: 上图中已通过输入python进入了python运行环境,出现>>>时候的不能再用python z.py 来运行hello.py文件: 应该通过exit()退出当前pyth ...

  7. 【异常】airflow-psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory

    1 异常信息 usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psut ...

  8. Azure File文件共享(6):使用Python开发

    Azure文件共享服务提供了多种方式的访问接口,包括Powershell,.Net, Java, Python等等,本章主要介绍如何使用Python来访问Azure File存储. 关于Python环 ...

  9. plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory

    装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...

随机推荐

  1. NPOI 读取excel的时候,时间格式的处理

    excel的时间格式是:CellType.Numeric 要判断时间还需要方法:DateUtil.IsCellDateFormatted(cell)的帮助: 示例代码如下: ICell cell = ...

  2. [工具开发] 分享两个基于Heapster 和 Influxdb 的 Grafana 监控仪表盘模板

    Info Collector: Heapster - /heapster- --metric-resolution=30s- --sink=influxdb:http://influxdb.defau ...

  3. rabbitmq - (消息队列) 的基本原理介绍

    介绍 MQ全称为Message Queue, 是一种分布式应用程序的的通信方法,它是消费-生产者模型的一个典型的代表,producer往消息队列中不断写入消息,而另一端consumer则可以读取或者订 ...

  4. 20175315Mycp

    MyCP(课下作业,必做) 要求 编写MyCP.java 实现类似Linux下cp XXX1 XXX2的功能,要求MyCP支持两个参数: java MyCP -tx XXX1.txt XXX2.bin ...

  5. 虚拟机上的centos7链接不上网络: activation of network connection failed

    报错: 重启网络也不行: 解决: 1.打开网络配置文件: $vi /etc/sysconfig/network-scripts/ifcfg-ens33  (可以参照这里的描述,找到这个文件https: ...

  6. postgresql分析函数

    参考:https://blog.csdn.net/haohaizijhz/article/details/83340814 SELECT uid, odate, num, sum(num) over ...

  7. C# 登陆验证码工具类VerifyCode

    using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; ...

  8. 移动端添加横向滚动条&隐藏

    添加横向滚动条ul { display: flex; overflow-x: auto; overflow-y: hidden; white-space: nowrap; }隐藏滚动条,保留滚动效果 ...

  9. js圆形头像实现

    定义CSS <style> .to{width:100px;height:100px;border-radius:100px} </style> 这样就实现了 主要是borde ...

  10. VMware workstation 上克隆CentOS 6.x 系统后网卡无法启动的问题

    在日常学习中,我们往往没有足够的物理机资源来搭建多节点的实验环境,一个比较好的解决方案就是利用虚拟机来模拟物理机完成实验. 这样一来,多节点操作系统的部署就可以利用VMware 自带的系统“克隆”功能 ...