Skip to content

Commit

Permalink
add python optional deps instructions to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
VitamintK committed May 20, 2022
1 parent 63e8a99 commit e664c10
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ In a nutshell:
./install.sh
```

3. Install your Python dependencies, e.g. in Python 3 using
3. Install your [Python dependencies](#installing-python-dependencies), e.g. in Python 3 using
[`virtualenv`](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/):

```bash
Expand All @@ -114,14 +114,19 @@ In a nutshell:

`pip` should be installed once and upgraded:

```
```bash
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# Install pip deps as your user. Do not use the system's pip.
python3 get-pip.py
pip3 install --upgrade pip
pip3 install --upgrade setuptools testresources
```

If you intend to use one of the [optional Python dependencies](open_spiel/scripts/python_extra_deps.sh), you must manually install and/or upgrade them, e.g.:
```bash
pip install --upgrade torch==1.11.0
```

4. This sections differs depending on the installation procedure:

**Building and testing from source**
Expand Down Expand Up @@ -252,11 +257,13 @@ repositories.
### Installing Python dependencies
#### Required dependencies
Using a `virtualenv` to install python dependencies is highly recommended. For
more information see:
[https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)
Install dependencies (Python 3):
Install required dependencies (Python 3):
```bash
virtualenv -p python3 venv
Expand All @@ -271,6 +278,14 @@ system-wide with:
pip3 install --upgrade -r requirements.txt
```
#### Optional dependencies
Additionally, if you intend to use one of the [optional Python dependencies](open_spiel/scripts/python_extra_deps.sh), you must manually install and/or upgrade them. The installation scripts will not install nor upgrade these dependencies. [ref](https://github.com/deepmind/open_spiel/issues/833)
```bash
pip install --upgrade torch==1.11.0
```
### Building and running tests
Make sure that the virtual environment is still activated.
Expand Down

0 comments on commit e664c10

Please sign in to comment.