From 79cc8825cead2de60e1bacf186b38effa73bd996 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Wed, 29 Apr 2020 09:06:17 +0200 Subject: [PATCH] docs: fix pip install instruction --- .github/labeler.yml | 4 ++++ docs/chapters/faq/dev.rst | 2 +- docs/chapters/helloworld/main.rst | 2 +- docs/chapters/install/via-pip.md | 4 ++-- jina/flow/__init__.py | 2 +- jina/logging/sse.py | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 739f11bf6923a..6299b09e1818f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -18,6 +18,9 @@ area/core: area/helper: - jina/*.py +area/helloworld: + - jina/helloworld/* + area/network: - jina/peapods/**/* - jina/proto/**/* @@ -74,3 +77,4 @@ component/proto: component/resource: - jina/resources/**/* + diff --git a/docs/chapters/faq/dev.rst b/docs/chapters/faq/dev.rst index 9d70575aa7b7e..9e06948128f66 100644 --- a/docs/chapters/faq/dev.rst +++ b/docs/chapters/faq/dev.rst @@ -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 `_ . \ No newline at end of file diff --git a/docs/chapters/helloworld/main.rst b/docs/chapters/helloworld/main.rst index dfca7d14d24ad..4246b21322f24 100644 --- a/docs/chapters/helloworld/main.rst +++ b/docs/chapters/helloworld/main.rst @@ -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 diff --git a/docs/chapters/install/via-pip.md b/docs/chapters/install/via-pip.md index 1ea0623112d34..0046e754a0a48 100644 --- a/docs/chapters/install/via-pip.md +++ b/docs/chapters/install/via-pip.md @@ -39,7 +39,7 @@ 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`. @@ -47,7 +47,7 @@ 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 diff --git a/jina/flow/__init__.py b/jina/flow/__init__.py index 5b694b74619be..250e1429ce176 100644 --- a/jina/flow/__init__.py +++ b/jina/flow/__init__.py @@ -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') diff --git a/jina/logging/sse.py b/jina/logging/sse.py index 27faf06ec02f9..32978c45beee6 100644 --- a/jina/logging/sse.py +++ b/jina/logging/sse.py @@ -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: