简体   繁体   English

如何使用cmd运行Spider编写的python程序

[英]How do I use the cmd to run a python program written in Spider

So I have gone into the cmd and found where my file I want to run is located.所以我进入了cmd并找到了我要运行的文件所在的位置。 It is called 3.py and my teacher had told us just to write "python 3.py" to run it.它被称为3.py ,我的老师告诉我们只需编写“python 3.py”即可运行它。 I did this and it doesn't say that there is anything wrong, it just does nothing.我这样做了,它并没有说有什么问题,它什么也没做。 Almost like there is nothing to be read in the file 3.py .几乎就像在文件3.py 中没有什么可读取的。 But I open it just to make sure I'm not just trying to run an empty file.但我打开它只是为了确保我不只是试图运行一个空文件。 My file has something simple in it like print("Hello there, this program is working") so I know it isn't not running because of an error in the code.我的文件中有一些简单的东西,比如print("Hello there, this program is working")所以我知道它没有因为代码错误而没有运行。 I am using spider from anaconda to write my code into.我正在使用 anaconda 的蜘蛛来写入我的代码。

I have found out how to do it now.我现在已经知道如何去做了。 You have to use Anaconda prompt rather than cmd.您必须使用 Anaconda 提示符而不是 cmd。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM