title: Running python3 and virtualenv in Google Cloud Instance
body: <p>Within the Google Cloud Instance SSH console (running Debian), I installed Flask using pip. </p>
  
  <p>Running <code>python3 demo.py</code> from the console or <code>demo.py</code> from the python3 interpreter (3.5.3) brings up <code>ImportError: cannot import name 'Flask'</code>.</p>
  
  <p>Running <code>sudo apt-get install python3-venv</code> appears to successfully install and set up venv for python 3.5. But when attempting to create a virtualenv based on the <a href="http://flask.pocoo.org/docs/1.0/installation/" rel="nofollow noreferrer">Flask docs</a>:</p>
  
  <pre><code>$ python3 -m venv venv
  /usr/bin/python3: No module named venv
  </code></pre>
  
  <p>Attempting <code>sudo apt-get install python-virtualenv</code> results in:</p>
  
  <pre><code>dpkg: error processing package virtualenv (--configure):
   dependency problems - leaving unconfigured
  Errors were encountered while processing:
   python3-virtualenv
   virtualenv
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  
  <p>Other unsuccessful suggestions include:</p>
  
  <pre><code>$ source venv/bin/activate
  -bash: venv/bin/activate: No such file or directory 
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>$ sudo virtualenv venv
  New python executable in /home/user/demo/venv/bin/python
  ERROR: The executable /home/user/demo/venv/bin/python is not functioning
  ERROR: It thinks sys.prefix is u'/usr' (should be u'/home/user/demo/venv')
  ERROR: virtualenv is not compatible with this system or executable
  </code></pre>
  
  <p>Using python -V confirms that the python version is 2.7 in the console. For fun, running <code>python demo.py</code> returns</p>
  
  <pre><code>ImportError: cannot import name zip_longest
  </code></pre>
  
  <p>Following <a href="https://stackoverflow.com/questions/23842713/using-python-3-in-virtualenv?rq=1">this thread</a>, I tried <code>pip install --upgrade virtualenv</code> resulting in:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/bin/pip", line 9, in &lt;module&gt;
      from pip import main
    File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in &lt;module&gt;
      from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
    File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 67, in &lt;module&gt;
      vendored("distro")
    File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
      __import__(modulename, globals(), locals(), level=0)
    File "/usr/share/python-wheels/distro-1.0.1-py2.py3-none-any.whl/distro.py", line 1051, in 
  &lt;module&gt;
    File "/usr/share/python-wheels/distro-1.0.1-py2.py3-none-any.whl/distro.py", line 595, in _
  _init__
    File "/usr/share/python-wheels/distro-1.0.1-py2.py3-none-any.whl/distro.py", line 934, in _
  get_lsb_release_info
  subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1
  </code></pre>
  
  <p>Am I missing something? Is this an issue with Google Cloud Console? Is there a workaround?</p>