安装Anaconda后如何读取.py文件? [英] How to read a .py file after I install Anaconda?

查看:1305
本文介绍了安装Anaconda后如何读取.py文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Anaconda,但是我不知道如何打开.py文件.

I have installed Anaconda, but I do not know how to open a .py file..

如果可能的话,请清楚地解释一下,我浏览了多个线程,但我都不理解..

If it is possible, please explain plainly, I browsed several threads, but I understood none of them..

非常感谢您的帮助.

最好

推荐答案

在操作系统的菜单结构中,您应该看到Anaconda的文件夹.在该文件夹中是Spyder的图标.单击该图标.

In the menu structure of your operating system, you should see a folder for Anaconda. In that folder is an icon for Spyder. Click that icon.

过一会儿(Spyder加载缓慢),您将看到Spyder集成环境.您可以从菜单中选择文件",然后选择打开",或者仅单击看起来像打开的文件夹的打开"图标.在出现的打开"对话框中,导航到相关文件夹并打开相关的.py文件.默认情况下,打开"对话框将看到.py,.pyw和.ipy文件,但是单击相关列表框将使您能够查看和加载许多其他类型的文件.打开该文件会将内容加载到Spyder的编辑器部分.您可以在那里查看或编辑文件,或使用Spyder的其他部分来运行,调试文件以及执行其他操作.

After a while (Spyder loads slowly) you will see the Spyder integrated environment. You can choose File then Open from the menu, or just click the Open icon that looks like an open folder. In the resulting Open dialog box, navigate to the relevant folder and open the relevant .py file. The Open dialog box will see .py, .pyw, and .ipy files by default, but clicking the relevant list box will enable you to see and load many other kinds of files. Opening that file will load the contents into the editor section of Spyder. You can view or edit the file there, or use other parts of Spyder to run, debug, and do other things with the file.

到目前为止,还没有内置方法可以直接从操作系统在Spyder中加载.py文件.您可以在Windows中通过双击.py文件,然后选择spyder.exe文件并告诉Windows始终使用该应用程序加载该文件来进行设置. Anaconda开发人员表示,即将发布的Anaconda版本将修改操作系统,以便双击即可将.py和其他文件加载到Spyder中.但是我上面说的适用于Windows.

As of now, there is no in-built way to load a .py file in Spyder directly from the operating system. You can set that up in Windows by double-clicking a .py file, then choosing the spyder.exe file, and telling Windows to always use that application to load the file. The Anaconda developers have said that a soon-to-come version of Anaconda will modify the operating system so that .py and other files will load in Spyder with a double-click. But what I said above works for Windows.

由于我不知道您的理解水平,所以这个答案有些简洁.询问是否需要更多详细信息.

This answer was a bit condensed, since I do not know your level of understanding. Ask if you need more details.

这篇关于安装Anaconda后如何读取.py文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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