You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2020/11/02 10:31:19 UTC

[airflow] branch master updated: Add homebrew/python/setproctitle issue to FAQ (#12025)

This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 66e74f5  Add homebrew/python/setproctitle issue to FAQ (#12025)
66e74f5 is described below

commit 66e74f58b59303485320cb596e4ca94d86ffd5f8
Author: Skylar Payne <sk...@gmail.com>
AuthorDate: Sun Nov 1 12:59:44 2020 -0800

    Add homebrew/python/setproctitle issue to FAQ (#12025)
---
 docs/faq.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/docs/faq.rst b/docs/faq.rst
index cdee7f1..f5e1555 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -228,3 +228,28 @@ If pausing or unpausing a dag fails for any reason, the dag toggle will
 revert to its previous state and turn red. If you observe this behavior,
 try pausing the dag again, or check the console or server logs if the
 issue recurs.
+
+Why do I see error when importing or running airflow: ``Symbol not found: _Py_GetArgcArgv``?
+-----------------------------------------------------
+
+If you are using a homebrew installed version of Python, this is generally caused by
+using python in ``/usr/local/opt/bin`` rather than the Frameworks installation (e.g. for ``python 3.7``: ``/usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7``).
+
+The crux of the issue is that a library Airflow depends on, ``setproctitle``, uses a non-public Python API
+which is not available from the standard installation ``/usr/local/opt/`` (which symlinks to a path under ``/usr/local/Cellar``).
+
+An easy fix is just to ensure you use a version of Python that has a dylib of the python library available. For example:
+
+.. code-block:: bash
+  :linenos:
+  # Note: these instructions are for python3.7 but can be loosely modified for other versions
+  brew install python@3.7
+  virtualenv -p /usr/local/opt/python@3.7/Frameworks/Python.framework/Versions/3.7/bin/python3 .toy-venv
+  source .toy-venv/bin/activate
+  pip install apache-airflow
+  python
+  >>> import setproctitle
+  # Success!
+
+
+Alternatively, you can download and install Python directly from the [Python website](https://www.python.org/).