Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Update setup_instruction.md #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 16 additions & 2 deletions setup/setup_instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,31 @@ Step 4: set up a project directory. You will do all work for this class in this
$ mkdir cs20
```

Step 5: set up virtual environment with python3
Step 5: set up virtual environment with python3 *Different if you are using Anaconda*
```bash
$ cd cs20
$ python3 -m venv .env
```
*If you find this error efter the last command, you probably have Anaconda installed*
```bash
Error: Command '['home/user/cs20/.env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
```
You need to create the environment without pip, and installing it later, as stated [here](https://github.com/ContinuumIO/anaconda-issues/issues/6917)

Instead of **`$ python3 -m venv .env`**, write:
```bash
$ python3 -m venv --without-pip .env
```
These commands create a venv subdirectory in your project where everything is installed.

Step 6: activate the virtual environment
```bash
$ source .env/bin/activate
```
If you created the virtual environment with the option `--without-pip`, you have to install it now. Type:
```bash
curl https://bootstrap.pypa.io/get-pip.py | python
```

If you type:
```bash
Expand Down Expand Up @@ -84,4 +98,4 @@ If you have problem with using Matplotlib in virtual environment, here are two s
Go there and create a file ~/.matplotlib/matplotlibrc there and add the following code: ```backend: TkAgg```
2. After importing matplotlib, simply add: ```matplotlib.use("TkAgg")```

If you run into more problems, feel free to post your questions on [Piazza](https://piazza.com/stanford/winter2018/cs20) or email us cs20-win1718-staff@lists.stanford.edu.
If you run into more problems, feel free to post your questions on [Piazza](https://piazza.com/stanford/winter2018/cs20) or email us cs20-win1718-staff@lists.stanford.edu.