Installing cleverhans on Colaboratory

1.6k views Asked by At

I am trying to install cleverhans (https://github.com/tensorflow/cleverhans)

I am running the following command

!pip install -q -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans

However, when I try to do import cleverhans I get an error saying that there's no such module.

PS If I try to install the module on my local machine, the source is stored in ~/.src/cleverhans.

1

There are 1 answers

2
Bob Smith On BEST ANSWER

It looks like the installation doesn't properly update the python path. Here's a snippet that worked for me:

!pip install -qq -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans
import sys
sys.path.append('/content/src/cleverhans')
import cleverhans