【发布时间】:2019-01-10 02:13:34
【问题描述】:
我正在尝试运行一个使用 Caffe 的 Jupyter 笔记本。 Caffe 不包含在 datalab 中。我正在尝试从 Jupyter 笔记本中安装该库(按照 datalab 文档中的建议),但遇到了问题。
我是datalab的新手,一般都是新手。任何建议将不胜感激。
datalab 文档建议 3 strategies 用于添加不是already included 的python 库。我专注于这些策略中的前两个。
我的数据云实例的平台是:
platform.platform() 'Linux-4.4.111+-x86_64-with-debian-stretch-sid'
下面我将列出我尝试过的各种方法以及我收到的错误消息。 对于第一个策略,我在同一个笔记本的一个单元格中尝试了这些东西。
(尝试 1)
!pip install caffe
#results in the error:
#Collecting caffe
# Could not find a version that satisfies the requirement caffe (from
#versions: )
#No matching distribution found for caffe
!pip install caffe-cpu
#results in the same error as above
我研究发现caffe不能用pip安装,所以我试了一下:
(尝试 2)
!apt-get install caffe
#results in the error:
#Reading package lists... Done
#Building dependency tree
#Reading state information... Done
#E: Unable to locate package caffe
!apt-get install caffe-cpu
#results in the same error as above
基于另一个stackoverflow question,我为 caffe 和 caffe-cpu 尝试了以下操作:
(尝试 3)
%bash
echo 'Y' | apt-get update
echo 'Y' | apt-get install caffe-cpu
#This results in output with a lot of warnings, but ends with the error:
#E: Unable to locate package caffe-cpu
#Stack Overflow prevented me from posting the entire thing, thinking it was spam
(尝试 4)
根据文档中推荐的second strategy,我尝试在单独的笔记本中运行此代码:
%%bash
echo "pip install caffe" >> /content/datalab/.config/startup.sh
cat /content/datalab/.config/startup.sh
#This resulted in the error:
#bash: /usr/local/lib/libtinfo.so.5: no version information available (required by bash)
我跑的时候得到了同样的结果:
%%bash
echo "apt-get install caffe" >> /content/datalab/.config/startup.sh
cat /content/datalab/.config/startup.sh
【问题讨论】:
标签: google-cloud-platform caffe google-cloud-datalab