Skip to content

Commit 623e893

Browse files
author
Dean Wampler
committed
Refined the instructions about Windows and also Python versions
1 parent d80e4ca commit 623e893

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

README.md

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,43 @@ However, consider cloning or downloading a release of the tutorial notebooks and
2828
2929
## Setup for a Local Machine
3030

31-
> **WARNING:** Ray does not currently run on Windows (we're close...). [Contact Anyscale](mailto:[email protected]) for a free hosted option.
31+
> **Note:** Ray support for Windows is experimental. See [these release notes](https://github.com/ray-project/ray/releases/tag/ray-0.8.6) for details. Alternatively, [Contact Anyscale](mailto:[email protected]) for a free hosted option for these tutorials.
3232
33-
If you are using MacOS or Linux, follow these instructions. Note that the setup commands can take a while to finish.
33+
Follow these instructions to use the tutorials. Note that some commands can take a while to finish.
3434

3535
Clone the [Academy GitHub repo](https://github.com/anyscale/academy) or [download the latest release](https://github.com/anyscale/academy/releases).
3636

3737
Now install the dependencies using either [Anaconda](https://www.anaconda.com/) or `pip` in your Python environment. We recommend using Anaconda.
3838

39+
### Which Python Version?
40+
41+
Python 3.7 is recommended. While Ray supports Python 3.6, a user reported a problem using _locales_. Specifically, the following code throws an error:
42+
43+
```python
44+
import locale
45+
locale.setlocale(locale.LC_ALL, locale.getlocale())
46+
```
47+
48+
This tutorial doesn't use _locales_ specifically, but you may run into problems with your default locale.
49+
50+
While Ray supports Python 3.8, some dependencies used in `RLlib` (the Ray reinforcement library) are not yet supported for 3.8, at the time of this writing.
51+
52+
3953
### Using Anaconda
4054

4155
If you need to install Anaconda, follow the instructions [here](https://www.anaconda.com/distribution/). If you already have Anaconda installed, consider running `conda upgrade --all`.
4256

43-
Run the following commands in the root directory of this project. First, use `conda` to install the other dependencies, including Ray. Then activate the newly-created environment, named `anyscale-academy`. Finally, run a provided script to install a graphing library extension in Jupyter Lab and perform other tasks.
57+
Run the following commands in the root directory of this project. First, use `conda` to install the other dependencies, including Ray. Then activate the newly-created environment, named `anyscale-academy`. Finally, run the provided `tools/fix-jupyter.sh` script to install a graphing library extension in Jupyter Lab and perform other tasks.
4458

4559
```shell
4660
conda env create -f environment.yml
4761
conda activate anyscale-academy
4862
tools/fix-jupyter.sh
4963
```
5064

51-
Note that Python 3.7 is used. While Ray supports Python 3.8, some dependencies used in `RLlib` (the Ray reinforcement library) are not yet supported for 3.8.
65+
If you are using Windows, see the _Fixing Jupyter Lab on Windows_ section below for an alternative to using `tools/fix-jupyter.sh`.
66+
67+
Note that Python 3.7 is used.
5268

5369
You can delete the environment later with the following command:
5470

@@ -60,37 +76,66 @@ conda env remove --name anyscale-academy
6076

6177
If you don't use Anaconda, you'll have to install these prerequisites first:
6278

63-
* Python 3.6 or 3.7: While Ray supports Python 3.8, some dependencies used in `RLlib` (the Ray reinforcement library) and other dependencies are not yet supported for 3.8.
79+
* Python 3.7:
80+
* See notes above about problems with 3.6 and 3.8. Don't use 3.8, but 3.6 may work for you.
6481
* The version of Python that comes with your operating system is probably too old. Try `python --version` to see what you have.
6582
* Installation instructions are at [python.org](https://www.python.org/downloads/).
6683
* Pip: A recent version - consider upgrading if it's not the latest version.
6784
* Installation instructions are at [pip.pypa.io](https://pip.pypa.io/en/stable/installing/).
6885
* Node.js: Required for some of the Jupyter Lab graphics extensions we use.
6986
* Installation instructions are [here](https://nodejs.org/en/).
7087

71-
Now run the following commands in the root directory of this project to complete the setup. First, run a `pip` command to install the rest of the libraries required for these tutorials, including Ray. Then, run a provided script to install a graphing library extension in Jupyter Lab and perform other tasks.
88+
Next, run the following commands in the root directory of this project to complete the setup. First, run the `pip` command to install the rest of the libraries required for these tutorials, including Ray. Then, run the provided script to install a graphing library extension in Jupyter Lab and perform other tasks.
7289

7390
```shell
7491
pip install -r requirements.txt
7592
tools/fix-jupyter.sh
7693
```
7794

95+
If you are using Windows, see the _Fixing Jupyter Lab on Windows_ section below for an alternative to using `tools/fix-jupyter.sh`.
96+
97+
### Fixing Jupyter Lab on Windows
98+
99+
The `tools/fix-jupyter.sh` shell script runs the following commands. If you are using Windows, run them yourself as shown here.
100+
101+
First, see if the following `pyviz` extension is installed:
102+
103+
```
104+
jupyter labextension check --installed "@pyviz/jupyterlab_pyviz"
105+
```
106+
107+
If not, run this command:
108+
109+
```
110+
jupyter labextension install "@pyviz/jupyterlab_pyviz"
111+
```
112+
113+
Finally, run these commands:
114+
115+
```
116+
jupyter labextension update --all
117+
jupyter lab build
118+
jupyter labextension list
119+
```
120+
78121
## Final Notes for Local Installation
79122

80-
The lessons will start a local Ray "cluster" (one node) on your machine. When you are finished with the tutorials, run the following command to shut down Ray:
123+
The tutorials will start a local Ray "cluster" (one node) on your machine. When you are finished with the tutorials, run the following command to shut down Ray:
81124

82125
```shell
83126
ray stop
84127
```
85128

86129
Also, when you have finished working through the tutorials, run the script `tools/cleanup.sh`, which prints temporary files, checkpoints, etc. that were created during the lessons. You might want to remove these as they can add up to 100s of MBs.
87130

88-
If you decide to delete all the files and directories listed, the following script will do it:
131+
If you decide to delete all the files and directories listed, the following `bash` command will do it:
89132

90133
```shell
91134
tools/cleanup.sh | while read x; do rm -rf $x; done
92135
```
93136

137+
> **Note:** A Windows version of this script is TBD.
138+
94139
## Launching the Tutorials
95140

96141
The previous steps installed [Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/), the notebook-based environment we'll use for all the lessons. To start run the following command in the project root directory:
@@ -120,10 +165,6 @@ Here is a recommended reading list, based on your interests:
120165

121166
See the [Overview notebook](Overview.ipynb) for detailed, up-to-date descriptions for each tutorial and the lessons it contains.
122167

123-
## Notes
124-
125-
* We use Python 3.7, because a dependency of `RLlib`, `atari-py`, doesn't have a wheel available for Python 3.8 at this time.
126-
127168
## Troubleshooting
128169

129170
See the [Troubleshooting, Tips, and Tricks](reference/Troubleshooting-Tips-Tricks.ipynb) notebook.

0 commit comments

Comments
 (0)