博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PyCharm vs Spyder:两个Python IDE的快速比较
阅读量:2520 次
发布时间:2019-05-11

本文共 8413 字,大约阅读时间需要 28 分钟。

If you have followed my blog you may have noticed that a lot of focus have been put on how to learn programming (particularly in Python). I have also written about Integrated Development Environments (IDEs). IDEs may, in fact, be very useful when learning how to code. When it comes to Python IDEs it may be hard to choose the best one (PyCharm vs Spyder?)

如果您关注我的博客,您可能已经注意到,很多注意力都集中在如何学习编程上(尤其是在Python中)。 我还写了有关集成开发环境(IDE)的文章。 实际上,在学习如何编码时,IDE可能非常有用。 对于Python IDE,可能很难选择最佳的IDE(PyCharm与Spyder?)。

In this post I will discuss two IDEs, namely  and . The second, Spyder, is my old favorite and the one I (still) use in the lab. However, I got a suggestion in one of my blog comments  (see the comments on this post: ) that I should test PyCharm and I did. After testing out PyCharm I started to like this IDE. In this post you will find my views on the two IDEs. E.g., I intend to answer the question; the best Python IDE; PyCharm or Spyder?

在本文中,我将讨论两个IDE,即   和 。 第二个是Spyder,是我的最爱,也是我(仍)在实验室中使用的那个。 但是,我在我的一个博客评论中提出了一个建议(请参阅这篇文章的评论: ),我应该测试PyCharm,然后我做了。 在测试了PyCharm之后,我开始喜欢这个IDE。 在本文中,您将找到我对两个IDE的看法。 例如,我打算回答这个问题; 最好的Python IDE; PyCharm还是Spyder?

The post will divided into the following sections:

该帖子将分为以下几节:

In the first section (1) I will outline some shared features of PyCharm and Spyder. I will then continue with describing features that is unique to PyCharm (2) and Spyder (3). Finally, I will go on and compare the two Python IDEs (4).

在第一部分(1)中,我将概述PyCharm和Spyder的一些共享功能。 然后,我将继续描述PyCharm(2)和Spyder(3)独有的功能。 最后,我将继续比较两个Python IDE(4)。

PyCharm和Spyder的共享功能 (Shared features of PyCharm and Spyder)

I will start discussion some of the shared features of PyCharm and Spyder. First, the both IDEs are free (well, Spyder is “more” free compared to PyCharm but if you are a student or a researcher you can get the full version of PyCharm free, also) and cross-platform. This means that you can download and install both Spyder and PyCharm on your Windows, Linux, or OS-X machine. This is of course awesome! PyCharm and Spyder also have the possibility to create projects, an editor with syntax highlighting and introspection for code completion, and have support for plugins.

我将开始讨论PyCharm和Spyder的一些共享功能。 首先,两个IDE都是免费的(与PyCharm相比,Spyder是“更多”免费的,但是如果您是学生或研究人员,您也可以免费获得完整版的PyCharm)和跨平台的。 这意味着您可以在Windows,Linux或OS-X机器上下载并安装Spyder和PyCharm。 这当然很棒! PyCharm和Spyder还可以创建项目,带有语法高亮显示和自省代码完成功能的编辑器,并支持插件。

 

药香 (PyCharm)

I must admit, the main thing I liked with PyCharm was that I could change the theme to a dark. I really prefer having my applications dark. That said, PyCharm of course comes with a bunch of features. I will not list all of them here but if you are interested you can read . As I have mentioned earlier, both PyCharm and Spyder have support for plugins. However, I find it easier to find and install plugins in Pycharm. To install a plugin you just open up settings (File -> Settings) and click on “Plugins”:

我必须承认,我喜欢PyCharm的主要目的是可以将主题更改为深色。 我真的更喜欢将应用程序调暗。 也就是说,PyCharm当然具有许多功能。 我不会在这里列出所有这些信息,但是如果您有兴趣,可以阅读。 如前所述,PyCharm和Spyder都支持插件。 但是,我发现在Pycharm中查找和安装插件更加容易。 要安装插件,您只需打开设置(文件->设置),然后单击“插件”:

PyCharm install plugins
PyCharm安装插件

 

This makes it very easy to search for plugins. For instance, one can install Markdown plugins to also write Markdown files (.md) that can be uploaded to your Github page. That leads me into another GREAT future of PyCharm; support for different types of Version Control Systems (VCS: e.g., GitHub, Subversion, and Mercurial). E.g., uploading your work to GitHub is only a few click aways (if you prefer not to use command line, that is).

这使得搜索插件非常容易。 例如,可以安装Markdown插件来编写Markdown文件(.md),这些文件可以上传到您的Github页面。 这使我进入了PyCharm的另一个伟大未来。 支持不同类型的版本控制系统(VCS:例如GitHub,Subversion和Mercurial)。 例如,将您的工作上传到GitHub只需点击几下(即,如果您不喜欢使用命令行,那就是)。

Another great feature is that you can set the with of your code and PyCharm will end our line and move it to next line (great if you are a lazy programmer.)

另一个很棒的功能是,您可以设置代码的with,PyCharm将结束我们的行并将其移至下一行(如果您是一个懒惰的程序员,那就太好了。)

Another feature of PyCharm is that you can safely rename and delete, extract your methods, among other things. It may be very helpful if you need to rename a variable that is used on various places in your code.

PyCharm的另一个功能是,您可以安全地重命名和删除,提取方法等。 如果您需要重命名在代码的各个位置使用的变量,这可能会非常有帮助。

One of my favorite features is that you can, much like in RStudio for R, install Python packages from within the interface. PyCharm offers an easy system to browse, download, and update 3rd party packages. If you are not only working with Python projects, PyCharm allso provides supprot for Javascript, CoffeScript, Typescript and CSS, for instance.

我最喜欢的功能之一是,就像在RStudio for R中一样,您可以在界面内安装Python软件包。 PyCharm提供了一个轻松的系统来浏览,下载和更新第三方软件包。 如果您不仅在处理Python项目,PyCharm allso还为Javascript,CoffeScript,Typescript和CSS提供支持。

斯派德 (Spyder)

Spyder GUI
Spyder GUI

First of all, Spyder is made in for and in Python! Of course this is not a feature of the IDE itself but I like that it’s quite pure Python!

首先,Spyder是用for和Python制作的! 当然,这不是IDE本身的功能,但我喜欢它是非常纯的Python!

However, one of the most obvious pros with Spyder is that is much easier to install (e.g., in Ubuntu) compared to PyCharm. Whereas PyCharm must be downloaded and installed, Spyder can be installed using Pip. It is also part of many Linux distributions package manager (e.g., apt in Debian Ubuntu).  There is one thing, however, that I really like with the Spyder interface; the variable explorer.

但是,与PyCharm相比,Spyder最明显的优点之一就是安装起来容易得多(例如,在Ubuntu中)。 尽管必须下载并安装PyCharm,但可以使用Pip安装Spyder。 它也是许多Linux发行版软件包管理器的一部分(例如,Debian Ubuntu中的apt)。 但是,我真的很喜欢Spyder界面。 变量浏览器。

Spyder variable explorer
Spyder变量浏览器

If you are getting stuck, and is not sure how to use a certain function or method, there is a section of the Spyder IDE in which you can type in the object and get the document string printed out. It can come in very handy, I think.

如果您陷入困境,并且不确定如何使用某些函数或方法,则可以在Spyder IDE的一部分中键入对象并打印出文档字符串。 我认为它可以非常方便。

Spyder help/object explorer
Spyder帮助/对象浏览器

斯皮德vs皮查姆 (Spyder vs Pycharm)

It is easier to install Spyder (at least in Linux) but PyCharm is not that hard to install. In fact, if you are running Ubuntu you can just add a PPA (See on how to install PyCharm this way) and install PyCharm using your favourite package manager. If you are a Windows user, you just download an installation file ().

Spyder的安装比较容易(至少在Linux中是这样),但是PyCharm的安装并不难。 实际上,如果您正在运行Ubuntu,则只需添加一个PPA(请参阅 ,了解如何以这种方式安装PyCharm)并使用您喜欢的软件包管理器安装PyCharm。 如果您是Windows用户,则只需下载安装文件( )。

Spyder is also part of a great Python distribution for Windows users. Python (x, y) is intended for scientific use, and you will get most of the Python packages that you may need (and probably more than you need!)  That is, for a Windows user, you will get most of what you need to do your Python programming AND the Spyder IDE with one installation.

Spyder还是面向Windows用户的出色Python发行版的一部分。 Python(x,y)是供科学使用的,您将获得可能需要的大多数Python软件包(可能超过所需的数量!),也就是说,对于Windows用户,您将获得所需的大部分东西一次安装即可完成Python编程和Spyder IDE。

Python(x, y) with Spyder IDE
带有Spyder IDE的Python(x,y)

PyCharms built-in support for VCS systems, such as Git and Mercurial, is also a great feature that is in favor for PyCharm. I know that some people find this attractive; they don’t have to use the command line.

对VCS系统(例如Git和Mercurial)的PyCharms内置支持,也是支持PyCharm的重要功能。 我知道有些人觉得这很有吸引力。 他们不必使用命令行。

Okey, which IDE do I think is the best? I think that Spyder, still, is a great IDE. PyCharm do, of course, offer a lot more features. If you are running a relatively new computer and is using Linux (e.g., Ubuntu), PyCharm may be the best (almost) free Python IDE.

Okey,我认为哪个IDE最好? 我认为Spyder仍然是出色的IDE。 PyCharm确实提供了更多功能。 如果您运行的是相对较新的计算机,并且正在使用Linux(例如Ubuntu),则PyCharm可能是最好的(几乎)免费的Python IDE。

On the other hand, if you are using Windows and don’t want to install a lot of Python packages by your self, Spyder is part of the great Python distribution Python (x, y). You may very well find yourself more pleased if you installed Python(x, y).

另一方面,如果您使用的是Windows,并且不想自己安装很多Python软件包,则Spyder是出色的Python发行版Python(x,y)的一部分。 如果安装了Python(x,y),您可能会感到非常满意。

In fact, in the lab where we run Windows 10, I have installed Python (x, y) and code using Spyder but at home I tend to write in PyCharm (except, for when I do data analysis and visualizations, then I use Jupyter Notebooks, but that is a different story).

实际上,在运行Windows 10的实验室中,我已经使用Spyder安装了Python(x,y)和代码,但是在家里我倾向于用PyCharm编写(除非当我进行数据分析和可视化时,然后使用Jupyter笔记本,但这是另外一回事了。

翻译自:

转载地址:http://jgqwd.baihongyu.com/

你可能感兴趣的文章
FPGA跨时钟域异步时钟设计的几种同步策略
查看>>
ORA-01113: file xxxx needs media recovery
查看>>
MySQL表的碎片整理和空间回收小结
查看>>
web.xml不认<taglib>解决办法(转)
查看>>
一个重要的MARK_STM32 delay_ms卡死
查看>>
基于winpcap的udpflood攻击
查看>>
【深入比较ThreadLocal模式与synchronized关键字】
查看>>
个人分享:平时开发中感觉几款不错 IDE 、插件、工具
查看>>
拒绝服务漏洞分析研究报告
查看>>
nginx 重写
查看>>
Sha256加密
查看>>
QML学习心得
查看>>
Java的Hashtable类(转)
查看>>
Conda usage
查看>>
HTML样式链接到外部样式表
查看>>
Activity启动模式
查看>>
使用HttpClient进行Post通信
查看>>
生成商户订单号/退款单号
查看>>
cmake的一个编译报错
查看>>
linux下connect超时时间探究
查看>>