I'm trying to run a Jupyter notebook that uses Caffe. Caffe is not included in datalab. I am trying to install that library from within the Jupyter notebook (as recommended in the datalab docs), but am running into problems.
I am new to datalab, and a novice with such things generally. Any advice would be very much appreciated.
The datalab documentation suggests 3 strategies for adding a python library that is not already included. I am concentrating on the first two of these strategies.
The platform for my datacloud instance is:
platform.platform() 'Linux-4.4.111+-x86_64-with-debian-stretch-sid'
Below I'll list various things I've tried and the error messages I got. For the first strategy, I tried these things in a cell of the same notebook.
(Attempt 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
I realized from my research that caffe could not be installed with pip, so I tried:
(Attempt 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
Based on another stackoverflow question, I tried the following for both caffe and caffe-cpu:
(Attempt 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
(Attempt 4)
Based on the second strategy recommended in the documentation, I tried running this code in a separate notebook:
%%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)
I got the same results when I ran:
%%bash
echo "apt-get install caffe" >> /content/datalab/.config/startup.sh
cat /content/datalab/.config/startup.sh