首页 > 解决方案 > Where to write python code in anaconda

问题描述

I have downloaded the anaconda distribution for the python but now I didn't find that where to write python programs like I was writing python code using python IDLE. Please help me to get rid of this problem

Thanks in Advance :)

P.S:- I only have anaconda and I have not downloaded python from its website or I don't have any previous versions of python installed on my system.

标签: pythonanaconda

解决方案


对于如何使用 anaconda 编写和执行 python 代码,您有几个选择。一种最简单的方法是python在 Anaconda Prompt(命令行)中简单地键入。这将打开一个交互式 python 界面,您可以在其中键入 python 代码并让它们逐行执行。

如果您想编写更长的 python 代码,最好在任何文本编辑器中键入您的 python 代码并将您的代码保存为your_code_name_here.py文件,然后在 Anaconda Prompt 中导航到您保存文件的.py文件夹并键入python your_code_name_here.py. 这将执行您的代码的全部主体。

或者,Anaconda 发行版附带 Spyder IDE(交互式开发环境)。您应该能够在您的程序中找到 Spyder,并且使用起来应该非常直观,因为您习惯于使用 IDE。


推荐阅读