by toyg · 8y ago · 0 comments
If the instance is ephemeral, I need to manage everything in HOME and that's fine. For Python, that basically means using Virtualenv. That works fine at the moment for python 2.7, but 3.x on Debian requires the package python3-venv, which is not installed by default - and sure enough, it's missing in Cloud Shell.
It's a bit annoying having to apt-get install python3-venv every time. Any chance it could be preinstalled? It's such an essential tool for modern python development...
It's an annoyance specific to Debian and to this day I'm not sure I understand the rationale for splitting it out of the main python3 package.
EDIT: Worked great!
@cloudshell:~/python3/bin$ ./ipython3
Python 3.6.4 (default, Jan 28 2018, 00:39:17)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from __future__ import braces
File "<ipython-input-1-6d5c5b2f0daf>", line 1
from __future__ import braces
^
SyntaxError: not a chance