From 7d528e607c0c6cd267d42b2ea36e96bc25e7bd80 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Thu, 20 Jan 2022 10:53:40 +0100 Subject: [PATCH] Update quickstart install steps (#10092) * For conda: * Use conda environment rather than venv * Install `spacy-transformers` as a conda package * For pip: * Add quotes if extras are included --- website/src/widgets/quickstart-install.js | 42 +++++++++++++++++------ 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/website/src/widgets/quickstart-install.js b/website/src/widgets/quickstart-install.js index 628e1c533..1c8ad19da 100644 --- a/website/src/widgets/quickstart-install.js +++ b/website/src/widgets/quickstart-install.js @@ -113,8 +113,7 @@ const QuickstartInstall = ({ id, title }) => { { id: 'venv', title: 'virtual env', - help: - 'Use a virtual environment and install spaCy into a user directory', + help: 'Use a virtual environment', }, { id: 'train', @@ -165,27 +164,51 @@ const QuickstartInstall = ({ id, title }) => { setters={setters} showDropdown={showDropdown} > - python -m venv .env - + + python -m venv .env + + source .env/bin/activate - + source .env/bin/activate - + .env\Scripts\activate + + python -m venv .env + + + source .env/bin/activate + + + source .env/bin/activate + + + .env\Scripts\activate + + + conda create -n venv + + + conda activate venv + pip install -U pip setuptools wheel pip install -U pip setuptools wheel - pip install -U {pkg} - {pipExtras && `[${pipExtras}]`} + {pipExtras + ? `pip install -U '${pkg}[${pipExtras}]'` + : `pip install -U ${pkg}`} {nightly ? ' --pre' : ''} conda install -c conda-forge spacy conda install -c conda-forge cupy + + conda install -c conda-forge spacy-transformers + git clone https://github.com/{repo} {nightly ? ` --branch ${DEFAULT_BRANCH}` : ''} @@ -205,9 +228,6 @@ const QuickstartInstall = ({ id, title }) => { # packages only available via pip - - pip install spacy-transformers - pip install spacy-lookups-data