Repository: pytorch
Issue: [Caffe2] Attempting to install Caffe2 in Google Colab
Labels: caffe2

## Issue description

Hello, I'm trying to install Caffe2 in Google Colab so I can work with Detectron.
I've tried installing from Source however it takes too long (more than 2 hours) so it is impractical for Colab. Thus, I'm forced to install from binaries using Anaconda.

I install anaconda without much issues.

`!bash ./Anaconda2-5.2.0-Linux-x86_64.sh`

However, I'm trying to follow the [recommendation](https://caffe2.ai/docs/faq.html#why-is-caffe2-not-working-as-expected-in-anaconda) to install Caffe2 on a different environment than the base one.
I manage to create the environment just fine, however, trying to activate it does not work. In particular using: `source activate test_caffe2` seems to do nothing. So it seems that's out.

So, I go and install Caffe2 using the base anaconda environment. First, I have to add some code to add the anaconda binaries to the PATH, as it seems the usual way to assign environmental variables in Colab seem to not work.
```
import os
os.environ['PATH'] += ":/root/anaconda2/bin"
```
Then installation as usual:
`conda install -c caffe2 caffe2-cuda9.0-cudnn7`

It installs without any issues. However, when trying to run the test code:
```
# To check if Caffe2 build was successful
python2 -c 'from caffe2.python import core'

```
It returns:
```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named caffe2.python
```

I understand this is probably some PYTHONPATH [issue](https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md#caffe2), however, I can't seem to find the "build" folder in caffe2.
If I search for caffe2 directory (`find / -type d -name 'caffe2'`)  after installing I only get the following results:
```
/root/anaconda2/pkgs/caffe2-cuda9.0-cudnn7-0.8.dev-py27_2018.08.26/lib/python2.7/site-packages/caffe2
/root/anaconda2/pkgs/caffe2-cuda9.0-cudnn7-0.8.dev-py27_2018.08.26/include/caffe2
/root/anaconda2/lib/python2.7/site-packages/caffe2
/root/anaconda2/include/caffe2
```
If I search in the directories of each result I get:

ls /root/anaconda2/pkgs/caffe2-cuda9.0-cudnn7-0.8.dev-py27_2018.08.26/lib/python2.7/site-packages/caffe2:
```
contrib  distributed  __init__.py   perfkernels  python
core	 experiments  __init__.pyc  proto
```
ls /root/anaconda2/pkgs/caffe2-cuda9.0-cudnn7-0.8.dev-py27_2018.08.26/include/caffe2:
```
contrib   distributed  mkl	  onnx	       predictor  sgd	      video
core	  experiments  mobile	  operators    proto	  share
cuda_rtc  ideep        mpi	  opt	       python	  transforms
db	  image        observers  perfkernels  queue	  utils
```
ls /root/anaconda2/lib/python2.7/site-packages/caffe2:
```
contrib  distributed  __init__.py   perfkernels  python
core	 experiments  __init__.pyc  proto
```
ls /root/anaconda2/include/caffe2:
```
contrib   distributed  mkl	  onnx	       predictor  sgd	      video
core	  experiments  mobile	  operators    proto	  share
cuda_rtc  ideep        mpi	  opt	       python	  transforms
db	  image        observers  perfkernels  queue	  utils
```
None of them has a build directory.

So finally I have some questions:

- **Was the Caffe2 installation successful?** I wonder given that I cannot find the 'build' directory.
- **Is this only a PYTHONPATH variable issue?** If so, to which folder should I point it?

I'm sorry if the question is noobish. But I'm a bit stuck. Thanks in advance!

### System Settings

- PyTorch or Caffe2: Caffe2
- How you installed PyTorch (conda, pip, source): conda
- Build command you used (if compiling from source):
- OS: Linux, whatever Colab's using.
- PyTorch version:
- Python version: 2.7
- CUDA/cuDNN version: 9.0 and 7.0
- GPU models and configuration:  Tesla K80
- GCC version (if compiling from source):
- CMake version:
- Versions of any other relevant libraries: