title: How to install a package in collaboratory using `python setup.py install`
body: <p>Right now, I have </p>
  
  <pre><code>!wget myPackage
  !tar -xvjf myPackage
  !cd myPackage &amp;&amp; python setup.py install
  </code></pre>
  
  <p><strong>All of which complete</strong>, but then </p>
  
  <pre><code>import myPackage
  </code></pre>
  
  <p>fails. That seems likely to be because the python which I call with <code>!python setup.py</code> is different than the python which executes each cell. How do I install a package using <code>!python setup.py install</code> such that I'm able to import the package?  </p>
  
  <p>I tried <code>!which python</code> which gave me <code>/usr/local/bin/python</code> but <code>/usr/local/bin/python setup.py install</code> had the same issue, which seems reasonable. </p>
  
  <p>Also see: <a href="https://colab.research.google.com/notebooks/snippets/importing_libraries.ipynb" rel="nofollow noreferrer">https://colab.research.google.com/notebooks/snippets/importing_libraries.ipynb</a></p>