You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/29 11:36:09 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361843664
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   Would be great to refer the opened https://issues.apache.org/jira/browse/AIRFLOW-6265 issue here. This whole description will be not needed when we solve it (hopefully soon :))

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services