Skip to content

Commit

Permalink
docs: fix pip install instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Apr 29, 2020
1 parent 6e8d2d9 commit 79cc882
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Expand Up @@ -18,6 +18,9 @@ area/core:
area/helper:
- jina/*.py

area/helloworld:
- jina/helloworld/*

area/network:
- jina/peapods/**/*
- jina/proto/**/*
Expand Down Expand Up @@ -74,3 +77,4 @@ component/proto:

component/resource:
- jina/resources/**/*

2 changes: 1 addition & 1 deletion docs/chapters/faq/dev.rst
Expand Up @@ -9,6 +9,6 @@ FAQ for Developers

Jina only requires very few dependencies as described in :file:`setup.py`. Please keep the content empty (with a `.`) in :file:`requirements.txt`, so that ``pip`` won't be confused when installing the dependencies.

:file:`extra-requirements.txt` is the executor-specific dependency which Jina does not require but some certain executor may do. They are collected here so that one can cherry pick the dependencies via :command:`pip install jina[xyz]`.
:file:`extra-requirements.txt` is the executor-specific dependency which Jina does not require but some certain executor may do. They are collected here so that one can cherry pick the dependencies via :command:`pip install "jina[xyz]"`.

More information about this trick can be `found in this blog post <https://hanxiao.io/2019/11/07/A-Better-Practice-for-Managing-extras-require-Dependencies-in-Python>`_ .
2 changes: 1 addition & 1 deletion docs/chapters/helloworld/main.rst
Expand Up @@ -85,7 +85,7 @@ View "Hello World" in Jina Dashboard
.. highlight:: bash
.. code-block:: bash
pip install jina[sse]
pip install "jina[sse]"
jina hello-world --logserver
Expand Down
4 changes: 2 additions & 2 deletions docs/chapters/install/via-pip.md
Expand Up @@ -39,15 +39,15 @@ Jina only requires five dependencies `numpy`, `pyzmq`, `protobuf`, `grpcio` and
Some of the Executors may require extra dependencies. The full table of the extra dependencies can be found in `extra-requirements.txt`. You can cherry-pick what you want to install, e.g.

```bash
pip install jina[nlp+cv]
pip install "jina[nlp+cv]"
```

This will install all dependencies tagged with `nlp` or `cv`.

Though not recommended, you can install Jina with full dependencies via:

```bash
pip install jina[all]
pip install "jina[all]"
```

## Install Jina on Raspberry Pi and other Linux Systems
Expand Down
2 changes: 1 addition & 1 deletion jina/flow/__init__.py
Expand Up @@ -442,7 +442,7 @@ def _start_log_server(self):
except ModuleNotFoundError:
self.logger.error(
f'sse logserver can not start because of "flask" and "flask_cors" are missing, '
f'use "pip install jina[http]" to install the dependencies')
f'use pip install "jina[http]" (with double quotes) to install the dependencies')
except:
self.logger.error('logserver fails to start')

Expand Down
2 changes: 1 addition & 1 deletion jina/logging/sse.py
Expand Up @@ -39,7 +39,7 @@ def start_sse_logger(server_config_path: str, flow_yaml: str = None):
except ImportError:
raise ImportError('Flask or its dependencies are not fully installed, '
'they are required for serving HTTP requests.'
'Please use "pip install jina[flask]" to install it.')
'Please use pip install "jina[flask]" to install it.')

try:
with open(server_config_path) as fp:
Expand Down

0 comments on commit 79cc882

Please sign in to comment.