哪个 IDE 用于在 Python 中进行科学计算和绘图?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20719180/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which IDE for scientific computing and plotting in Python?
提问by ECII
I am currently using R for all my scientific computing and plotting, but I would like to explore Python. I have been using RStudioas an IDE for R, which as an IDE fulfills 100% of my need for scientific computing, number crunching, data analysis and visualizations. Is there something similar for Python? Basically syntax highlighting, code completion, smart indentation, code execution directly from the source editor, plotting within the IDE and version control (git).
我目前将 R 用于我所有的科学计算和绘图,但我想探索 Python。我一直在使用RStudio作为 R 的 IDE,它作为 IDE 可以 100% 满足我对科学计算、数字运算、数据分析和可视化的需求。Python有类似的东西吗?基本上是语法高亮、代码完成、智能缩进、直接从源代码编辑器执行代码、在 IDE 中绘图和版本控制 (git)。
采纳答案by Kirell
I strongly suggest that you install a complete scientific python distribution such as Anacondaor Enthought Pythonwhich contains all the packages you need for science (numpy, scipy, matplotlib, numba, pandas, etc.)
我强烈建议您安装完整的科学 Python 发行版,例如Anaconda或Enthought Python,其中包含科学所需的所有软件包(numpy、scipy、matplotlib、numba、pandas 等)。
For scientific computing, the de-facto standard is to use IPython instead of python. It is a improved python interpreter, with batteries includes (indentation, completion, history, HPC, etc.).
对于科学计算,事实上的标准是使用 IPython 而不是 Python。它是一个改进的 python 解释器,电池包括(缩进、完成、历史、HPC 等)。
For you IDE, Matlab-like, you have basically one choice: Spyder(which as a basic git support). The other IDE are nicers but they lack the tools for inspecting datasets. Spyder directly runs an IPython session which can be edited later on with other tools.
对于像 Matlab 这样的 IDE,您基本上只有一个选择:Spyder(作为基本的 git 支持)。另一个 IDE 更好,但它们缺乏检查数据集的工具。Spyder 直接运行 IPython 会话,稍后可以使用其他工具对其进行编辑。
Another one IPython notebook (now known as Jupyter) which is a new and very powerful tool especially if you want to document your code with Latex code. Your IPython session is embedded and directly transferable to others, easily versionable.
另一个 IPython 笔记本(现在称为Jupyter),这是一个新的非常强大的工具,特别是如果你想用 Latex 代码记录你的代码。您的 IPython 会话是嵌入的,可直接传输给其他人,易于版本化。
You can also run an interactive presentation directly within the notebook, which is a nice way to show results. Think of it as the future of research, where your results are interactive. Anyone who can download the notebook will run the same exact experiments.
您还可以直接在笔记本中运行交互式演示,这是显示结果的好方法。将其视为研究的未来,您的结果是交互式的。任何可以下载笔记本的人都将运行完全相同的实验。
Take a look at the multiple examples already out there:
看看已经存在的多个示例:
If you don't like to work in the browser, I suggest my setup which is:
如果你不喜欢在浏览器中工作,我建议我的设置是:
Anaconda (python distribution with science packages)
Sublime Text 3(lightweight code editor) with the SublimeREPL, SublimeIPythonNotebook
IPython Qt console (inline plotting, completion, saved sessions, saved datasets, etc.)
Anaconda(带有科学包的python 发行版)
带有SublimeREPL、SublimeIPythonNotebook 的Sublime Text 3(轻量级代码编辑器)
IPython Qt 控制台(内联绘图、完成、保存的会话、保存的数据集等)
Remember that all the IPython front ends (IPython console, IPython QtConsole, IPython Notebook, SublimeREPL, etc.) can be connected to the same IPython core instance.
请记住,所有 IPython 前端(IPython 控制台、IPython QtConsole、IPython Notebook、SublimeREPL 等)都可以连接到同一个 IPython 核心实例。
So, you can easily mix different tools at the same time depending on your needs (writing documentation, writing scientific stuff, code, presentation).
因此,您可以根据自己的需要(编写文档、编写科学内容、代码、演示文稿)轻松地同时混合使用不同的工具。
One IPython core to rule them all :-)
一个 IPython 核心来统治它们 :-)
回答by Abhijit
Start with any IDE which supports (in-fact lots of IDE these days has support for) syntax highlighting, code completion, smart indentation, code execution directly from the source editor. If you are unsure refer the SO Question What IDE to use for Python?
从任何支持(实际上现在很多 IDE 都支持)语法高亮、代码完成、智能缩进、直接从源代码编辑器执行代码的 IDE 开始。如果您不确定,请参考 SO Question What IDE to use for Python?
- Next, explore matplotlibfor your plotting needs.
- Next, what ever IDE you chose, search for a git pluggin. If your chosen IDE does not have one, select another from the IDE list which has the necessary git pluggin.
- Install the necessary packages like Numpy/ Scipy/ Sympy. Refer the link Numeric and Scientific
- 接下来,探索matplotlib以满足您的绘图需求。
- 接下来,无论您选择什么 IDE,都可以搜索 git 插件。如果您选择的 IDE 没有,请从 IDE 列表中选择另一个具有必要的 git 插件。
- 安装必要的软件包,如 Numpy/Scipy/Sympy。请参阅链接数字和科学
NoteEclipse with PyDevmight work considering it has support for git (EGit)and you would have no issue with integrating matplotlib. Infact there is another SO thread dedicated for Interactive matplotlib through Eclipse PyDev
注意带有PyDev 的Eclipse可能会工作,因为它支持 git ( EGit),并且集成 matplotlib 没有问题。事实上,还有另一个 SO 线程通过 Eclipse PyDev专用于Interactive matplotlib
Finally, if you want to sacrifice on ease of development compared to PyCharm or PyDev, Scientific Pythonmay be a good option for you.
最后,如果您想牺牲与 PyCharm 或 PyDev 相比的开发简易性,Scientific Python可能是您的不错选择。
回答by BenC
You could try Spyderwhich is multi-platform, easy to use, provides syntax coloring, interactive debugging etc. You will still rely on libraries such as matplotlibor NumPy, and the IDE itself may not be good enough if you are dealing with very large sets of numbers.
您可以尝试使用多平台、易于使用、提供语法着色、交互式调试等功能的Spyder。您仍将依赖于诸如matplotlib或NumPy 之类的库,如果您正在处理非常大的数据,IDE 本身可能不够好数组。
There are also other similar projects such as Python(x,y)or WinPython(Windows only) that try to promote/facilitate the use of Python for scientific and engineering software development.
还有其他类似的项目,例如Python(x,y)或WinPython(仅限 Windows),它们试图促进/促进 Python 在科学和工程软件开发中的使用。
回答by geotheory
I suspect this is a duplicate (at least partially) of thisor thisquestion. So far I've been recommended IDLE, PyCharm, PHPStorm, Spyder, PyDev, Aptana, Wing, IPython and DreamPie. Haven't tried them all but Spyder held up quite well. Overall I've found the Enthought Python Distribution best as it comes with Scipy, Numpy and other key packages already included, as well as Spyder IDE. The fully package is commercial (free for academics) but there's also a free distribution.
我怀疑这是这个或这个问题的重复(至少部分)。到目前为止,我一直被推荐为 IDLE、PyCharm、PHPStorm、Spyder、PyDev、Aptana、Wing、IPython 和 DreamPie。还没有全部尝试过,但 Spyder 保持得很好。总的来说,我发现 Enthought Python Distribution 是最好的,因为它带有 Scipy、Numpy 和其他已经包含的关键包,以及 Spyder IDE。完整的包是商业的(对学者免费),但也有免费分发。

