将python库添加到Google Datalab环境 [英] Adding python libraries to google datalab environment

查看:169
本文介绍了将python库添加到Google Datalab环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Google云平台上使用 google datalab .第一次尝试时效果很好,我喜欢现在在云中运行jupyter笔记本服务器非常容易(比启动localhost服务器更快).太棒了.

I'm using google datalab on google cloud platform. Worked great on the first try and I love how easy it is to now run a jupyter notebook server in the cloud (faster than starting up a localhost server). It's fantastic.

但是现在我想安装基本数据实验室环境中未包含的python库(特别是我需要Bokeh绘图库).

But now I want to install python libraries not included in the basic datalab environment (specifically I need the Bokeh plotting library).

因此,我从google cloud控制台打开了一个google cloud外壳,在其中管理这个jupyter笔记本实例,安装了miniconda,然后是bokeh库.一切运行都没有错误(例如bokeh在安装过程中安装了多个依赖项),但是我在datalab上的jupyter笔记本(可以导入其他库,例如numpy)仍然给我一个没有名为bokeh.plotting的模块"错误.

So I opened a google cloud shell from the google cloud console where I manage this jupyter notebook instance, installed miniconda and then the bokeh library. Everything ran without error (e.g. bokeh installs several dependencies along the way), but my jupyter notebook on datalab (which can import other libraries like numpy) still gives me a "no module named bokeh.plotting" error.

有什么想法吗?预先感谢.

Any ideas? Thanks in advance.

推荐答案

您可以在笔记本中进行此操作:

You can do this inside a notebook:

%%bash
pip install bokeh

这篇关于将python库添加到Google Datalab环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆