mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Merge pull request #6889 from adrianeboyd/docs/source-install-dup [ci skip]
This commit is contained in:
commit
433835d9b0
12
README.md
12
README.md
|
@ -253,20 +253,14 @@ source .env/bin/activate
|
||||||
# make sure you are using the latest pip
|
# make sure you are using the latest pip
|
||||||
python -m pip install -U pip setuptools wheel
|
python -m pip install -U pip setuptools wheel
|
||||||
|
|
||||||
pip install .
|
pip install -r requirements.txt
|
||||||
|
pip install --no-build-isolation --editable .
|
||||||
```
|
```
|
||||||
|
|
||||||
To install with extras:
|
To install with extras:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install .[lookups,cuda102]
|
pip install --no-build-isolation --editable .[lookups,cuda102]
|
||||||
```
|
|
||||||
|
|
||||||
To install all dependencies required for development, use the [`requirements.txt`](requirements.txt). Compared to regular install via pip, it
|
|
||||||
additionally installs developer dependencies such as Cython.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🚦 Run tests
|
## 🚦 Run tests
|
||||||
|
|
|
@ -170,26 +170,17 @@ $ git clone https://github.com/explosion/spaCy # clone spaCy
|
||||||
$ cd spaCy # navigate into dir
|
$ cd spaCy # navigate into dir
|
||||||
$ python -m venv .env # create environment in .env
|
$ python -m venv .env # create environment in .env
|
||||||
$ source .env/bin/activate # activate virtual env
|
$ source .env/bin/activate # activate virtual env
|
||||||
$ pip install . # compile and install spaCy
|
$ pip install -r requirements.txt # install requirements
|
||||||
|
$ pip install --no-build-isolation --editable . # compile and install spaCy
|
||||||
```
|
```
|
||||||
|
|
||||||
To install with extras:
|
To install with extras:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ pip install .[lookups,cuda102] # install spaCy with extras
|
$ pip install --no-build-isolation --editable .[lookups,cuda102]
|
||||||
```
|
```
|
||||||
|
|
||||||
To install all dependencies required for development:
|
How to install compilers and related build tools:
|
||||||
|
|
||||||
```bash
|
|
||||||
$ pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
Compared to a regular install via pip, the
|
|
||||||
[`requirements.txt`](%%GITHUB_SPACY/requirements.txt) additionally includes
|
|
||||||
developer dependencies such as Cython and the libraries required to run the test
|
|
||||||
suite. See the [quickstart widget](#quickstart) to get the right commands for
|
|
||||||
your platform and Python version.
|
|
||||||
|
|
||||||
<a id="source-ubuntu"></a><a id="source-osx"></a><a id="source-windows"></a>
|
<a id="source-ubuntu"></a><a id="source-osx"></a><a id="source-windows"></a>
|
||||||
|
|
||||||
|
@ -227,7 +218,7 @@ source code and recompiling frequently.
|
||||||
```bash
|
```bash
|
||||||
$ pip install -r requirements.txt
|
$ pip install -r requirements.txt
|
||||||
$ python setup.py build_ext --inplace -j N
|
$ python setup.py build_ext --inplace -j N
|
||||||
$ pip install --no-build-isolation --editable .
|
$ python setup.py develop
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building an executable {#executable}
|
### Building an executable {#executable}
|
||||||
|
@ -264,36 +255,6 @@ You can configure the build process with the following environment variables:
|
||||||
| `PYVER` | The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to `3.6`. |
|
| `PYVER` | The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to `3.6`. |
|
||||||
| `WHEELHOUSE` | Directory to store the wheel files during compilation. Defaults to `./wheelhouse`. |
|
| `WHEELHOUSE` | Directory to store the wheel files during compilation. Defaults to `./wheelhouse`. |
|
||||||
|
|
||||||
#### Additional options for developers {#source-developers}
|
|
||||||
|
|
||||||
Some additional options may be useful for spaCy developers who are editing the
|
|
||||||
source code and recompiling frequently.
|
|
||||||
|
|
||||||
- Install in editable mode. Changes to `.py` files will be reflected as soon as
|
|
||||||
the files are saved, but edits to Cython files (`.pxd`, `.pyx`) will require
|
|
||||||
the `pip install` or `python setup.py build_ext` command below to be run
|
|
||||||
again. Before installing in editable mode, be sure you have removed any
|
|
||||||
previous installs with `pip uninstall spacy`, which you may need to run
|
|
||||||
multiple times to remove all traces of earlier installs.
|
|
||||||
|
|
||||||
```diff
|
|
||||||
pip install -U pip setuptools wheel
|
|
||||||
- pip install .
|
|
||||||
+ pip install -r requirements.txt
|
|
||||||
+ pip install --no-build-isolation --editable .
|
|
||||||
```
|
|
||||||
|
|
||||||
- Build in parallel using `N` CPUs to speed up compilation and then install in
|
|
||||||
editable mode:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
pip install -U pip setuptools wheel
|
|
||||||
- pip install .
|
|
||||||
+ pip install -r requirements.txt
|
|
||||||
+ python setup.py build_ext --inplace -j N
|
|
||||||
+ python setup.py develop
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run tests {#run-tests}
|
### Run tests {#run-tests}
|
||||||
|
|
||||||
spaCy comes with an [extensive test suite](%%GITHUB_SPACY/spacy/tests). In order
|
spaCy comes with an [extensive test suite](%%GITHUB_SPACY/spacy/tests). In order
|
||||||
|
|
Loading…
Reference in New Issue
Block a user