本文介绍了IPython,Sage,Dependencies,Anaconda和Package Integration?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用IPython进行交互式开发和探索性研究,我发现它非常令人兴奋,具有所有很酷的功能和可能性。我正在使用Anaconda包管理器来管理依赖项,其中包括IPython。

I've just started using IPython for interactive development and exploratory research, which I've found really exciting with all the cool features and possibilities. I am using the Anaconda package manager to manage dependencies, which includes IPython.

从我读过的内容来看,IPython团队的一个目标是最终整合Sage Math( CAS)进入IPython,作为一个细胞魔法。有谁知道这是否还在开发中?或者更确切地说,如果我现在想要使用Sage,那么写一个扩展只是这样做的唯一方法[1]?

From what I've read, one goal of the IPython team is to eventually integrate Sage Math (CAS) into IPython, as a cell magic. Does anyone know if this is still under development? Or rather, if I wanted to use Sage now, is writing an extension the only way to do this [1]?

[1]

另外,如果我安装了用于科学开发的附加软件包,不包含在Anaconda发行版中,那就像pip一样简单,还是必须通过Anaconda软件包构建来处理依赖关系等等?如果我只使用IPython,我可以理解只是按照文档中的建议做easy_install或pip,但我相信它会覆盖Anaconda中的现有依赖项。如果我使用pip,如果我不在Anaconda环境中安装,那么它如何影响Anaconda依赖项,我采用的是与virtualenv.py相同的,这也是设置修订控制的方式(即Mercurial)?

Also, if I install additional packages for scientific development, not included in the Anaconda distribution, is that as easy as just pip or do I have to go through a Anaconda package build to handle dependencies and such? If I were only using IPython, I could understand just doing easy_install or pip as recommended in the docs, but I believe that overwrites existing dependencies within Anaconda. If I use pip, how does that affect Anaconda dependencies if I do not install in an Anaconda environment, which I take is the equivalent as virtualenv.py, and is this the way to also set up revision control (i.e. Mercurial)?

为了澄清,我不想在Sage中运行IPython,我想从IPython中运行Sage,作为CAS。我宁愿采用Sage方法来集成特定于域的语言。或者相反,IPython扩展会取代Sage吗?

To clarify, I do not want to run IPython from within Sage, I want to run Sage, as a CAS, from within IPython. I'd rather go the Sage approach of integrating domain specific languages. Or in contrast, will IPython extensions replace Sage?

我是一名自学成才的程序员,而不是专业的软件开发人员。作为一名工程师,我习惯于使用Matlab,Mathematica和商业解决方案,这使我能够抽象出管道。我正试图将所有东西粘在一起,但由于缺乏知识,它就像是意大利面条汤和动态链接库的混合物。我可能使用了错误的方法。

I'm a self taught programmer, not a professional software developer. As an engineer, I am used to Matlab, Mathematica, and commercial solutions, that allow me to abstract away the plumbing. I'm trying to wrap my mind around getting everything glued together, but it's like a mix of spaghetti soup and a dynamic link library, due to lack of knowledge. I'm probably using the wrong approach.

我想要的是Anaconda / Enthought包管理(IPython,pandas等等),自定义滚动Sage通过钩子/扩展或魔法,Anaconda中未包含的包的扩展(即Matlab参见上面的[1]),以及Git和Mercurial的版本控制。专业开发人员如何在Mac或Linux机器上设置它?

What I want is Anaconda/Enthought package management (IPython, pandas, etc..), custom rolled Sage through hooks/extensions or magics, extensions to packages not included in Anaconda (i.e. Matlab see [1] above), and revision control with Git and Mercurial. How would professional developers set this up on a Mac or Linux box?

推荐答案

我编写了一个IPython扩展来将Sage自定义加载到IPython笔记本---事实上,这是为普通的Sage界面完成了多少IPython的自定义。它基本上将IPython笔记本变成了Sage的接口(例如,预先完成等等)。

I wrote an IPython extension to load Sage customizations into the IPython notebook---in fact, that's how many of the customizations to IPython are done for the normal Sage interface. It basically turns the IPython notebook into an interface to Sage (e.g., preparsing is done, etc.).

你需要从Sage的IPython副本中运行它,尽管。刚启动IPython笔记本:

You do need to run it from Sage's copy of IPython, though. Just start the IPython notebook:

sage -ipython notebook

然后在单元格中加载sage扩展名:

and then load the sage extension in a cell:

%load_ext sage.misc.sage_extension

我们很快就会升级到IPython 1.0(我已经做了必要的修改) ,它需要审查)。如果您想要运行IPython 1.0,请发送电子邮件至sage-support邮件列表,我将发布说明。

Pretty soon we'll upgrade to IPython 1.0 (I've made the changes necessary, and it needs to be reviewed). If you want to run IPython 1.0 already, email the sage-support mailing list and I'll post instructions.

要回答您的其他问题,Sage包含许多软件包。不适用于Anaconda。对于许多功能,Sage严重依赖这些包。我想有可能让Sage和它的依赖关系像Anaconda一样分发,但据我所知,没有人正在研究它。有一些关于为不同的Linux发行版打包Sage并为Sage替换包管理器的工作。

To answer your other question, Sage includes many packages that are not available in Anaconda. Sage depends on these packages heavily for many features. I suppose there is a possibility getting Sage and its dependencies distributed with something like Anaconda, but no one is working on that as far as I know. There is some work on packaging Sage up for different linux distributions and replacing the package manager for Sage.

这篇关于IPython,Sage,Dependencies,Anaconda和Package Integration?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 20:11