简体   繁体   English

我可以打包IPython Notebook,依赖项和其他模块吗?

[英]Can I package the IPython Notebook, dependencies and additional modules?

I need the following working environment for a project with several developers: 对于有多个开发人员的项目,我需要以下工作环境:

  • python3 python3
  • ipython (notebook) ipython(笔记本)
  • numpy numpy的
  • networkx networkx
  • matplotlib matplotlib

Installing these packages on different systems (OSX, Ubuntu, Suse) is time-consuming and problems are quite likely in my experience. 在不同的系统(OSX,Ubuntu,Suse)上安装这些软件包非常耗时,而且我的经验很可能会出现问题。 Is it possible to package them (maybe with virtualenv ) into a single repository which users can simply clone and start working? 是否可以将它们(可能使用virtualenv )打包到一个存储库中,用户可以简单地克隆并开始工作?

There is no Windows in your list, which is fortunate. 您的列表中没有Windows,这是幸运的。

I would do this by creating a single repo that they can clone. 我会通过创建一个他们可以克隆的单个仓库来做到这一点。 You could put the required Python 3.3 installer in the repo and request people to install that if they have not done so yet. 您可以将所需的Python 3.3安装程序放在repo中,并请求人们安装它,如果他们还没有这样做的话。

After cloning the repo, your collaborators would then do the following: 克隆回购后,您的协作者将执行以下操作:

First ensure that virtualenv and virtualenvwrapper are installed globally: 首先确保virtualenv和virtualenvwrapper全局安装:

sudo pip install virtualenv virtualenvwrapper

Activate virtualenvwrapper: 激活virtualenvwrapper:

# consider adding this to ~/.profile or equivalent
source /usr/local/bin/virtualenvwrapper.sh

Create and activate ipy virtual environment: 创建并激活ipy虚拟环境:

mkvirtualenv ipy

Install the necessary requirements: 安装必要的要求:

pip install -r repo/reqs.txt

repo/reqs.txt contains the following: repo / reqs.txt包含以下内容:

tornado
pyzmq
ipython
numpy
matplotlib

In future, they would just do: 将来,他们会这样做:

workon ipy

to activate the relevant virtualenv, and then: 激活相关的virtualenv,然后:

ipython notebook

to start the ipython notebook. 启动ipython笔记本。

I would suggest using an all in one installer like Anaconda or EPD. 我建议使用像Anaconda或EPD这样的一体化安装程序。 I don't think a single repo to clone will work as, I guess many thing like numpy will need a compile step. 我不认为克隆的单个repo会起作用,我想像numpy这样的东西需要编译步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM