Skip to content

Commit

Permalink
Merge pull request #7 from breakertt/patch-2
Browse files Browse the repository at this point in the history
fix deprecated function reload
  • Loading branch information
omariott authored Sep 27, 2021
2 parents 755d032 + 570958b commit 605b619
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions notes/environment-set-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,11 @@ Note that after the first time a Python module is loaded into an interpreter ins
import mlp
```

Running the `import` statement any further times will have no effect even if the underlying module code has been changed. To reload an already imported module we instead need to use the [`reload`](https://docs.python.org/2.7/library/functions.html#reload) function, e.g.
Running the `import` statement any further times will have no effect even if the underlying module code has been changed. To reload an already imported module we instead need to use the [`importlib.reload`](https://docs.python.org/3/library/importlib.html#importlib.reload) function, e.g.

```
reload(mlp)
import importlib
importlib.reload(mlp)
```

**Note: To be clear as this has caused some confusion in previous labs the above `import ...` / `reload(...)` statements should NOT be run directly in a bash terminal. They are examples Python statements - you could run them in a terminal by first loading a Python interpreter using:**
Expand Down Expand Up @@ -370,7 +371,7 @@ Below are instructions for setting up the environment without additional explana

---

Start a new bash terminal. Download the latest 64-bit Python 2.7 Miniconda install script:
Start a new bash terminal. Download the latest 64-bit Python 3.9 Miniconda install script:

```
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
Expand Down

0 comments on commit 605b619

Please sign in to comment.