From c3b0b0059ab3c43438ae1403c73a0b68a2eb2baa Mon Sep 17 00:00:00 2001 From: Jonathan Young Date: Thu, 18 Oct 2018 11:04:36 -0700 Subject: [PATCH] Added Interpreter Selection for Virtualenv --- class_materials/setup_python.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/class_materials/setup_python.md b/class_materials/setup_python.md index d688311..6917ef4 100644 --- a/class_materials/setup_python.md +++ b/class_materials/setup_python.md @@ -81,6 +81,28 @@ C:\> # TODO: need the windows command for this $ pip install ipython mock ``` +* Alternatively if you have multiple python interpreters installed you can choose which one like this: +```bash +This will install python2.7 from your system onto the virtualenv +$ virtualenv -p `which python2.7` venv + +OR + +This will install python3.6 from your system onto the virtualenv +$ virtualenv -p `which python3.6` venv + +OR + +This will install python3.7 from your system onto the virtualenv +$ virtualenv -p `which python3.7` venv + +$ source venv/bin/activate +$ (venv) ... : which python +$ (venv) ... : /Users/../../venv/bin/python + +``` + + ## Done with commands for now! If you (if you're working in pairs, you and your partner) are done, then now you can put your green sticky up! This is how we know you're done with the commands.