适用于Matlab用户的python第3部分选择一个ide

Now, this is where things start to get complicated. There are a ton of Python IDEs out there, with as many opinions on which is the best as there are Python developers. I will therefore not tell you which one is the best, as what is the best for me might not be the best for you. I will however summarize the pros and cons of a few IDEs below

现在,这里开始变得复杂起来。 那里有大量的Python IDE,与Python开发人员一样,对哪种观点最好的看法也很多。 因此,我不会告诉您哪个是最好的,因为对我来说最好的可能对您不是最好的。 但是,我将在下面总结一些IDE的优缺点。

以上所有都是跨平台的,这意味着它们适用于Windows,OSX和Linux。 (All of the above are all cross-platform meaning they work for both Windows, OSX and Linux.)

In the following, I will provide a brief walk-through of the IDEs.

在下文中,我将简要介绍这些IDE。

Ive taken a screenshot from each IDE, showing what it looks like when you multiply two random matrices a and b.

我从每个IDE截取了一个屏幕截图,显示了将两个随机矩阵ab相乘时的样子。

原子 (Atom)

Image for post

Atom is actually just a text editor, but it supports a ton of plugins. This makes it possible to turn Atom into a quite feature-rich Python IDE.

Atom实际上只是一个文本编辑器,但它支持大量的插件。 这样就可以将Atom变成功能丰富的Python IDE。

The most popular Python plugin is Hydrogen which allows you to run Python (and Jupyter) code in Atom.

最受欢迎的Python插件是Hydrogen ,它允许您在Atom中运行Python(和Jupyter)代码。

However, being built entirely on plugins, the Python support in Atom doesn’t have the same native feel and look as some of the other IDEs. Debugging in Atom is also quite complicated. But for lightweight Python scripting, it’s very capable.

但是,由于完全基于插件构建,因此Atom中的Python支持与其他一些IDE不具有相同的本机外观。 在Atom中进行调试也非常复杂。 但是对于轻量级的Python脚本,它非常有能力。

Good for: Lightweight scripting in a nice editor with many plugins.

擅长:在具有许多插件的不错的编辑器中进行轻量级脚本编写。

Jupyter实验室 (Jupyter Lab)

Image for post

Jupyter Lab is the IDE extension of Jupyter Notebooks, and just like the Notebooks it also runs the browser. However you get nice additions such as a terminal and the option to include plugins such as a variable explorer and a debugger.

Jupyter Lab是Jupyter Notebooks的IDE扩展,就像Notebooks一样,它也运行浏览器。 但是,您会获得一些不错的附加功能,例如终端,并可以选择包含插件(例如变量资源管理器和调试器)。

Jupyter Lab runs really well and, with plugins, contains all the basic building blocks you would expect from an IDE.

Jupyter Lab运行得非常好,并且带有插件,包含了您期望从IDE获得的所有基本构建块。

Good for: General purpose scripting and debugging

擅长:通用脚本和调试

Jupyter笔记本 (Jupyter Notebooks)

Image for post

Jupyter notebooks are a quick and simple way to quickly write and run some code and document it meanwhile. See, Jupyter Notbooks are just like the Live Scripts in Matlab, where you can combine code and text in a single document. This is very useful for when you want to create a simple example to show off a new feature or for doing homework assignments.

Jupyter笔记本是快速编写和运行一些代码并同时对其进行记录的一种快速简便的方法。 看,Jupyter Notbook就像Matlab中的实时脚本一样,您可以在其中将代码和文本组合在一个文档中。 当您要创建一个简单的示例来展示新功能或进行家庭作业时,这非常有用。

A cool thing about Jupyter notebooks is that they run in the browser, i.e. no IDE is installed. However, there is no debugger provided, and you never really get the IDE-feel you do with some of the other tools.

关于Jupyter笔记本,一个很酷的事情是它们在浏览器中运行,即未安装IDE。 但是,没有提供调试器,并且您从未真正获得使用其他一些工具所做的IDE感觉。

Good for: Lightweight mock-ups and homework assignments and documenting your code.

擅长:轻巧的模型和家庭作业,并记录您的代码。

药香 (PyCharm)

Image for post

My impression with PyCharm is that it’s a huge program which can do anything you would expect from a full-fledged Python IDE. It has a great debugger, variable explorer and has support for many plugins.

我对PyCharm的印象是,它是一个庞大的程序,可以完成您期望使用成熟的Python IDE进行的所有操作。 它具有出色的调试器,变量资源管理器,并支持许多插件。

I only see two disadvantages:

我只看到两个缺点:

  1. As opposed to the other IDEs presented, PyCharm is not free, unless you are eligible for the academic version. There is a free version available, but in this you don’t get the highly useful Scientific View which includes the variable explorer and generally makes PyCharm very Matlab-like (see here for more).

    与提供的其他IDE相对,PyCharm不是免费的,除非您有资格使用学术版本。 有一个免费版本可用,但是您没有得到非常有用的Scientific View ,它包括变量资源管理器,并且通常使PyCharm非常类似于Matlab( 请参见此处 )。

  2. It can be quite complicated to get started. You have to configure which Python interpreter to use, as well as configure projects and a bunch of other settings. Sure it can be done, but if you just want to get started it can feel a bit overwhelming.

    开始可能非常复杂。 您必须配置要使用的Python解释器,以及配置项目和许多其他设置。 当然可以,但是如果您只是想入门,可能会觉得有些不知所措。

Good for: Big, complex simulations where a full IDE and powerful debugger is needed.

优点:大型,复杂的仿真,需要完整的IDE和强大的调试器。

斯派德 (Spyder)

Image for post

Spyder is probably one of the most famous Python IDEs as it is shipped by default with Anaconda. This means it can simply be opened from the Anaconda Navigator. It is very similar to Matlab, and contains a console, variable explorer and debugger by default. However, there is no support for Jupyter notebooks.

Spyder可能是最著名的Python IDE之一,因为Anaconda默认附带了它。 这意味着可以轻松地从Anaconda Navigator中打开它。 它与Matlab非常相似,默认情况下包含一个控制台,变量资源管理器和调试器。 但是,不支持Jupyter笔记本。

So for making math-heavy scripts where you need a debugger and variable explorer, Spyder is an obvious (and easy) choice.

因此,对于需要大量调试器和变量资源管理器的需要编写大量数学脚本的情况,Spyder是一个显而易见的(而且很容易的)选择。

Good for: What you would normally use Matlab for

优点:通常使用Matlab进行操作

Visual Studio代码(VScode) (Visual Studio Code (VScode))

Image for post

Visual studio is one of the most popular Python IDEs due to its simplicity and light-weight implementation. It is therefore easy to find help should you have any problems, and it is currently under heavy development, received updates quite often. It doesn’t have as many features as e.g. PyCharm, but it still does the most essential stuff.

由于其简单和轻量级的实现,Visual Studio是最受欢迎的Python IDE之一。 因此,如果您有任何问题,就很容易找到帮助,并且它正在大量开发中,经常会收到更新。 它没有像PyCharm这样的功能,但是它仍然具有最基本的功能。

If you need a good resource for setting up Python in VS code, you can check out this nice guide Miguel Grinberg:

如果您需要很好的资源来在VS代码中设置Python,可以查看这份不错的指南Miguel Grinberg

Good for: More lightweight scripting than what you would do in Matlab

优点:比您在Matlab中做的要轻巧的脚本编写

Now that we have gone through the various IDEs, it’s time to pick one and install it. My recommendation would be to start with Spyder unless you have a reason or strong desire to try one of the other IDEs.

既然我们已经遍历了各种IDE,现在是时候选择一个并安装它了。 我的建议是从Spyder开始,除非您有理由或强烈希望尝试其他IDE之一。

In the next part, we will be looking at environments and packages which are good ways to structure your code and to keep your workspace organised between different projects.

在下一部分中 ,我们将研究环境和程序包,它们是构造代码并保持不同项目之间的工作区有序的好方法。

翻译自: https://medium.com/@rasmusgs/python-for-matlab-users-part-3-choosing-an-ide-af45b427d183

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值